-
-
Notifications
You must be signed in to change notification settings - Fork 80
94 lines (82 loc) · 2.22 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Secrets
# UNITY_LICENSE:
name: test
on:
push:
branches:
- develop
tags:
- "!*"
pull_request:
types:
- opened
- synchronize
jobs:
unity-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unityVersion: [
"2018.3.14f1",
"2018.4.30f1",
"2019.1.14f1",
"2019.2.21f1",
"2019.3.15f1",
"2019.4.16f1",
"2020.1.17f1",
"2020.2.1f1",
]
steps:
# Checkout sandbox project
- uses: actions/checkout@v4
with:
ref: sandbox
submodules: true
fetch-depth: 0
# Update package submodule
- name: "Update package submodule"
working-directory: Packages/dev
run: git checkout ${{ github.sha }}
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ matrix.unityVersion }}-${{ github.sha }}
restore-keys: |
Library-${{ matrix.unityVersion }}-
Library-
# Install codecoverage package
# - name: "Install codecoverage package"
# if: startsWith(matrix.unityVersion, '2019.4.')
# run: |
# npx openupm-cli add -f [email protected]
# Run tests
- name: "Run tests"
uses: game-ci/unity-test-runner@v3
with:
unityVersion: ${{ matrix.unityVersion }}
customParameters: -nographics
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
# - uses: actions/upload-artifact@v2
# if: always()
# with:
# name: TestResults-${{ matrix.unityVersion }}
# path: |
# artifacts/*.xml
# CodeCoverage/**/TestCoverageResults_*.xml
# publish:
# needs: unity-test
# runs-on: ubuntu-latest
# if: always()
# steps:
# - uses: actions/download-artifact@v2
# with:
# path: artifacts
# - uses: testspace-com/setup-testspace@v1
# with:
# domain: ${{github.repository_owner}}
# - name: Push test results
# if: always()
# run: |
# testspace `find . -name '*.xml' | tr '\n' ' '`