forked from MirrorNetworking/Mirror
-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (57 loc) · 2.03 KB
/
RunUnityTests.yml
File metadata and controls
66 lines (57 loc) · 2.03 KB
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
name: Run Unity Tests
on:
workflow_dispatch:
workflow_call:
jobs:
RunUnityTests:
name: Run Unity Tests
runs-on: ubuntu-latest
strategy:
matrix:
unityVersion:
# - 2019.4.40f1
- 2020.3.48f1
- 2021.3.45f1
- 2022.3.55f1
- 2023.2.20f1
- 6000.0.32f1
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Do Not Enable Caching --- Library needs to be recompiled every time because Weaver
# Leaving this here for posterity to ensure we never turn this on.
#- name: Cache Library
# id: cache-library
# uses: actions/cache@v3
# with:
# path: Library
# key: Library-${{ matrix.unityVersion }}
- name: Run editor Tests
uses: game-ci/unity-test-runner@v4
# We can use the same license for all Unity versions
# See https://game.ci/docs/github/activation/
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# testMode is set to editMode (editor tests only) until we fix playmode tests (or eliminate them)
# `-stackTraceLogType None` speeds up the job and vastly shrinks the log output
# If a test actually fails, we'll diagnose it locally anyway, so the stacktrace doesn't really help
with:
projectPath: ./
testMode: editmode
unityVersion: ${{ matrix.unityVersion }}
customParameters: -stackTraceLogType None
- name: Archive test results
uses: actions/upload-artifact@v4
if: always()
with:
name: Test Results ${{ matrix.unityVersion }}
path: artifacts
- name: Publish test results
uses: MirrorNetworking/nunit-reporter@master
if: always()
with:
reportTitle: Test Report ${{ matrix.unityVersion }}
path: "artifacts/*.xml"
access-token: ${{ secrets.GITHUB_TOKEN }}