-
-
Notifications
You must be signed in to change notification settings - Fork 148
53 lines (46 loc) · 1.4 KB
/
unity.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
name: test unity plugin
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
cover:
name: test and cover
runs-on: ubuntu-latest
strategy:
matrix:
projectPath:
- plugins/unity
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
- name: Run tests and generate coverage report
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 }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
testMode: editmode
coverageOptions: useProjectSettings;generateAdditionalMetrics
customParameters: -debugCodeOptimization -enableCodeCoverage
- name: Upload coverage report
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ${{ steps.tests.outputs.coveragePath }}/**/*.xml
fail_ci_if_error: true