Skip to content

Commit e1d3b74

Browse files
authored
Merge pull request #119 from arimger/feature/test-workflow
Force standalone tests in the test.yml workflow
2 parents f5435d4 + ef75379 commit e1d3b74

File tree

1 file changed

+23
-30
lines changed

1 file changed

+23
-30
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,39 @@ on:
66

77
env:
88
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
9+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
10+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
911

1012
jobs:
11-
testRunner:
12-
name: Test all modes 📝
13+
testAllModes:
14+
name: Test in '${{ matrix.testMode }}' 📝
1315
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
testMode:
20+
- playmode
21+
- editmode
22+
- standalone
1423
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@v2
17-
18-
- name: Create LFS file list
19-
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
20-
21-
- name: Restore LFS cache
22-
uses: actions/cache@v2
23-
id: lfs-cache
24+
- uses: actions/checkout@v4
2425
with:
25-
path: .git/lfs
26-
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
27-
28-
- name: Git LFS Pull
29-
run: |
30-
git lfs pull
31-
git add .
32-
git reset --hard
33-
34-
- name: Restore Library cache
35-
uses: actions/cache@v2
26+
lfs: true
27+
- uses: actions/cache@v3
3628
with:
3729
path: Library
3830
key: Library-test-project
3931
restore-keys: |
4032
Library-test-project-
4133
Library-
42-
43-
- uses: game-ci/unity-test-runner@v2
44-
id: testRunner
34+
- uses: game-ci/unity-test-runner@v4
35+
id: tests
4536
with:
46-
testMode: all
47-
48-
- uses: actions/upload-artifact@v2
37+
testMode: ${{ matrix.testMode }}
38+
artifactsPath: ${{ matrix.testMode }}-artifacts
39+
checkName: ${{ matrix.testMode }} Test Results
40+
- uses: actions/upload-artifact@v3
41+
if: always()
4942
with:
50-
name: Test results (all modes)
51-
path: ${{ steps.testRunner.outputs.artifactsPath }}
43+
name: Test results for ${{ matrix.testMode }}
44+
path: ${{ steps.tests.outputs.artifactsPath }}

0 commit comments

Comments
 (0)