-
Notifications
You must be signed in to change notification settings - Fork 34
58 lines (52 loc) · 1.94 KB
/
main.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
name: Test package
on: [push, pull_request]
jobs:
testAllModes:
name: Test in ${{ matrix.testMode }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- test-package
unityVersion:
- "2020.3.0f1"
testMode:
- playmode
- editmode
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: create a game by using demo project
run: |
mkdir ${{ matrix.projectPath }}
cp -r ./Demo~/* ${{ matrix.projectPath }}
rm ./${{ matrix.projectPath }}/Assets/Plugins/backtrace-unity
mkdir ./${{ matrix.projectPath }}/Assets/Plugins/backtrace-unity
mv ./Android ./Editor ./iOS ./Runtime ./Tests ./Windows ./package.json ./${{ matrix.projectPath }}/Assets/Plugins/backtrace-unity
ls ./
find ./${{ matrix.projectPath }}/Assets/Plugins/backtrace-unity
- uses: game-ci/unity-test-runner@v4
id: tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ./${{ matrix.projectPath }}/backtrace-unity
unityVersion: ${{ matrix.unityVersion }}
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.testMode }}-artifacts
checkName: ${{ matrix.testMode }} Test Results
coverageOptions: "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*"
- uses: actions/upload-artifact@v3
if: always()
with:
name: Test results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.artifactsPath }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: Coverage results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.coveragePath }}