forked from RE-SS3D/SS3D
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (73 loc) · 2.47 KB
/
editmodetestrunner.yml
File metadata and controls
73 lines (73 loc) · 2.47 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
67
68
69
70
71
72
73
#https://game.ci/docs/github/test-runner
name: Run Tests
on:
[push, pull_request_target, workflow_dispatch]
jobs:
run_tests:
name: Run tests
runs-on: ubuntu-latest
environment:
name: unity_tests
steps:
- name: Checkout project code
uses: actions/checkout@v3
with:
lfs: true
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- run: npm install @actions/core
- run: npm install @actions/github
- run: npm install jsdom
- run: npm install fs
- name: Debug Secret Visibility
run: |
if [ -z "${{ secrets.UNITY_LICENSE }}" ]; then
echo "SECRET IS EMPTY"
else
echo "SECRET IS DEFINED"
fi
- name: Debug license/email/password lengths
run: |
echo "UNITY_LICENSE length: ${#UNITY_LICENSE}"
echo "UNITY_EMAIL length: ${#UNITY_EMAIL}"
echo "UNITY_PASSWORD length: ${#UNITY_PASSWORD}"
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
- name: Run tests
uses: game-ci/unity-test-runner@v4
with:
testMode: editmode
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
- 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