Skip to content

Commit 21dd46c

Browse files
committed
Create tests.yaml
1 parent b0ab5a8 commit 21dd46c

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/tests.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- documentation
7+
- gh-pages
8+
pull_request: {}
9+
10+
jobs:
11+
test:
12+
name: ${{ matrix.testMode }} on Unity ${{ matrix.unityVersion }}
13+
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
projectPath:
20+
- .
21+
unityVersion:
22+
- 2021.3.45f2
23+
- 2023.2.22f1
24+
testMode:
25+
- editmode
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
lfs: true
32+
33+
- name: Cache
34+
uses: actions/cache@v4
35+
with:
36+
path: ${{ matrix.projectPath }}/Library
37+
key: Library-${{ runner.os }}-${{ matrix.projectPath }}-${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ hashFiles('**/Packages/manifest.json', '**/Packages/packages-lock.json', '**/ProjectSettings/ProjectVersion.txt') }}
38+
restore-keys: |
39+
Library-${{ runner.os }}-${{ matrix.projectPath }}-${{ matrix.unityVersion }}-${{ matrix.testMode }}-
40+
Library-${{ runner.os }}-${{ matrix.projectPath }}-${{ matrix.unityVersion }}-
41+
Library-${{ runner.os }}-${{ matrix.projectPath }}-
42+
43+
- name: Tests
44+
uses: game-ci/unity-test-runner@v4
45+
id: tests
46+
env:
47+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
48+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
49+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
50+
with:
51+
projectPath: ${{ matrix.projectPath }}
52+
unityVersion: ${{ matrix.unityVersion }}
53+
testMode: ${{ matrix.testMode }}
54+
artifactsPath: test-results
55+
artifactsName: TestResults-${{ matrix.unityVersion }}-${{ matrix.testMode }}

0 commit comments

Comments
 (0)