-
-
Notifications
You must be signed in to change notification settings - Fork 24
75 lines (69 loc) · 2.28 KB
/
gameci.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
name: GameCI
on:
push:
branches: [ master, master-* ]
pull_request_target: {}
workflow_dispatch: {}
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- unity: 2019
projectRef: b552a002fa121b0d7c233b49241f5f6279d0fa90 # project-for-test-2019
- unity: 2022
projectRef: de0b2dde7824e33986730c40866d74cfe526942b # project-for-test-2022
unity:
- 2019
- 2022
permissions:
checks: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.projectRef }}
- uses: actions/checkout@v4
with:
path: Packages/com.anatawa12.avatar-optimizer
ref: ${{ github.event.pull_request.head.sha }}
- uses: anatawa12/sh-actions/resolve-vpm-packages@master
with:
repos: |
https://vpm.anatawa12.com/vpm.json
- uses: actions/cache@v4
with:
path: Library
key: Library-${{ matrix.unity }}
restore-keys: Library-${{ matrix.unity }}
- uses: game-ci/unity-test-runner@v3
id: gameci
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE_V3 }}
with:
testMode: EditMode
githubToken: ${{ github.token }}
coverageOptions: generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+com.anatawa12.avatar-optimizer.*
customParameters: -nographics -assemblyNames com.anatawa12.avatar-optimizer.test
checkName: Test results ${{ matrix.unity }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: Test results ${{ matrix.unity }}
path: ${{ steps.gameci.outputs.artifactsPath }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: Coverage results ${{ matrix.unity }}
path: ${{ steps.gameci.outputs.coveragePath }}
conclude-gameci:
runs-on: ubuntu-latest
if: ${{ always() }}
needs: [build-and-test]
steps:
- name: Conclude Tests
env: { NEEDS: "${{ toJSON(needs) }}" }
run: |
echo "$NEEDS" | jq -c '. | to_entries[] | [.key, .value.result]'
echo "$NEEDS" | jq -e '. | all(.result == "success")' > /dev/null