forked from blocktest-game/blocktest
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (63 loc) · 1.99 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Test Project
on:
pull_request: {}
push: { branches: [master, dev] }
jobs:
# # Request license file job
# requestManualActivationFile:
# name: Request manual activation file
# runs-on: ubuntu-latest
# steps:
# # Request manual activation file
# - name: Request manual activation file
# uses: game-ci/unity-request-activation-file@v2
# id: getManualLicenseFile
# with:
# unityVersion: 2020.2.5f1
# # Upload artifact (Unity_v20XX.X.XXXX.alf)
# - name: Expose as artifact
# uses: actions/upload-artifact@v1
# with:
# name: ${{ steps.getManualLicenseFile.outputs.filePath }}
# path: ${{ steps.getManualLicenseFile.outputs.filePath }}
testAllModes:
name: Test in ${{ matrix.testMode }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- Blocktest
testMode:
- playmode
- editmode
steps:
- uses: actions/checkout@v2
with:
lfs: true
- uses: actions/cache@v2
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}
restore-keys: |
Library-
- name: Setup license
env:
LICENSE_FILE_PATH: ./.github/License.ulf
run: |
echo 'UNITY_LICENSE<<LICENSE-EOF' >> "$GITHUB_ENV"
cat "$LICENSE_FILE_PATH" >> "$GITHUB_ENV"
printf "\nLICENSE-EOF" >> "$GITHUB_ENV"
- uses: game-ci/unity-test-runner@v2
id: tests
with:
projectPath: ${{ matrix.projectPath }}
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.testMode }}-artifacts
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: ${{ matrix.testMode }} Test Results
- uses: actions/upload-artifact@v2
if: always()
with:
name: Test results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.artifactsPath }}