-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (57 loc) · 2 KB
/
test.yaml
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
name: Unity Tests
on:
push:
branches:
- master
pull_request:
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE_2020 }}
jobs:
testAllModes:
name: Test on version ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
shell: bash
- name: Cache Library
uses: actions/cache@v2.1.1
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }}-${{ steps.get-date.outputs.date }}
restore-keys: |
Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }}-
Library-${{ matrix.projectPath }}-
Library-
- run: ./scripts/coverageAssemblyFilters
id: assemblyFilters
- uses: game-ci/unity-test-runner@v2
id: tests
with:
artifactsPath: TestResults
customParameters: -burst-disable-compilation -enableCodeCoverage -coverageOptions generateAdditionalMetrics;enableCyclomaticComplexity;assemblyFilters:${{ steps.assemblyFilters.outputs.result }}
- name: Upload Test Results Artifacts
uses: actions/upload-artifact@v1
with:
name: Test results
path: ${{ steps.tests.outputs.artifactsPath }}
- name: Upload Code Coverage Artifacts
uses: actions/upload-artifact@v1
with:
name: Code Coverage
path: ./CodeCoverage
- name: Upload PlayMode Test Coverage Report
uses: codecov/codecov-action@v1
with:
flags: unittests
file: ./CodeCoverage/workspace-opencov/PlayMode/TestCoverageResults_0000.xml
- name: Upload EditMode Test Coverage Report
uses: codecov/codecov-action@v1
with:
flags: unittests
file: ./CodeCoverage/workspace-opencov/EditMode/TestCoverageResults_0000.xml