-
-
Notifications
You must be signed in to change notification settings - Fork 136
52 lines (52 loc) · 1.72 KB
/
editmodetestrunner.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
#https://game.ci/docs/github/test-runner
name: Run Tests
on: [push, pull_request, workflow_dispatch]
jobs:
run_tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout project code
uses: actions/checkout@v3
with:
lfs: true
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm install @actions/core
- run: npm install @actions/github
- run: npm install jsdom
- run: npm install fs
- name: Run tests
uses: game-ci/unity-test-runner@v2
with:
testMode: editmode
env:
UNITY_LICENSE_FILE: ../Documents/UnityLicense.ulf
- name: Produce summary output
uses: ./.github/actions/interpret-test-results
if: always()
id: interpret-test-results
with:
XML_PATH: artifacts/editmode-results.xml
- name: Notify discord if tests fail
uses: rjstone/discord-webhook-notify@v1
if: failure() && github.event_name != 'pull_request'
with:
severity: error
details: ${{ steps.interpret-test-results.outputs.DISPLAY_STRING }}
webhookUrl: ${{ secrets.DISCORD_WEBHOOK_TEST_RESULTS }}
- name: Notify discord if tests succeed
uses: rjstone/discord-webhook-notify@v1
if: success() && github.event_name != 'pull_request'
with:
severity: info
details: ${{ steps.interpret-test-results.outputs.DISPLAY_STRING }}
webhookUrl: ${{ secrets.DISCORD_WEBHOOK_TEST_RESULTS }}
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: Test results
path: artifacts