-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (41 loc) · 1.77 KB
/
unity-tests.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: unity-tests
# on:
# pull_request:
# branches:
# - master
# jobs:
# test:
# name: Run Test Suite
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# - name: Setup Node.js
# uses: actions/setup-node@v2
# with:
# node-version: '14'
# - name: Download Unity 2021.3.6f1
# run: |
# curl -o UnityInstaller.pkg https://download.unity3d.com/download_unity/d691e07d38ef/MacEditorInstaller/Unity.pkg
# sudo /usr/sbin/installer -dumplog -package UnityInstaller.pkg -target /
# - name: Install Unity dependencies
# run: |
# sudo /Applications/Unity/Unity.app/Contents/MacOS/Unity -installStandardAssets
# - name: Install Dependencies
# run: cd ./testchain && yarn Install
# - name: Start Testchain
# run: |
# yarn start:hardhat & echo $! > .pid
# cd ..
# - name: Run Test Suite
# run: /Applications/Unity/Unity.app/Contents/MacOS/Unity -runTests -projectPath "$(pwd)"
# - name: Stop Testchain
# if: always() # Ensure this step runs even if tests fail
# run: make stop
# - name: Rename Test Results
# if: always() # Ensure this step runs even if tests fail
# run: mv TestResults*.xml TestResults.xml
# - name: Print Summary
# if: always() # Ensure this step runs even if tests fail
# run: |
# head -n 2 TestResults.xml | grep -Eo 'result="[^"]+"|total="[^"]+"|passed="[^"]+"|failed="[^"]+"|inconclusive="[^"]+"|skipped="[^"]+"|start-time="[^"]+"|end-time="[^"]+"|duration="[^"]+"' | grep -Ev 'clr-version=|engine-version=|asserts=|id=|testcasecount=' | sed -E 's/^[^"]+"([^"]+)"[^"]+"([^"]+)".*/\1: \2/'