-
Notifications
You must be signed in to change notification settings - Fork 9
104 lines (85 loc) · 3.06 KB
/
ci.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: ci
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
jobs:
test_dotnet:
runs-on: ubuntu-20.04
steps:
- name: setup env
run: sudo apt-get update -yy && sudo apt-get install -yy make git python3
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- run: make test-dotnet
coverage:
needs: [test_dotnet]
runs-on: ubuntu-20.04
steps:
- name: setup env
run: sudo apt-get update -yy && sudo apt-get install -yy make git python3
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- run: |
curl -s https://codecov.io/bash > codecov
chmod +x codecov
- run: make coverage-dotnet
- run: ./codecov -f coverage/lcov.info
test_unity:
strategy:
matrix:
include:
- unity_version: 2019.4.22f1
docker_container: unityci/editor:ubuntu-2019.4.22f1-base-0.11.0
ulf_secrets_key: UNITY_2019_4_22_f1_ULF
runs-on: ubuntu-20.04
container: ${{ matrix.docker_container }}
env:
HAS_XSLTPROC: 1 # To export JUnit formatted Test Summary
steps:
- name: setup env
run: |
apt update -yy && apt install -yy --no-install-recommends software-properties-common
add-apt-repository -yy ppa:git-core/ppa
apt update -yy && apt install -yy --no-install-recommends make git python3 xsltproc
env:
DEBIAN_FRONTEND: noninteractive
- name: setup unity license
run: |
mkdir -p ~/.cache/unity3d
mkdir -p ~/.local/share/unity3d/Unity/
echo "$UNITY_ULF" | base64 -d > ~/.local/share/unity3d/Unity/Unity_lic.ulf
env:
UNITY_ULF: ${{ secrets[matrix.ulf_secrets_key] }}
- uses: actions/checkout@v3
with:
submodules: recursive
- name: download RuntimeUnitTestToolkit
run: |
curl -sL https://github.com/Cysharp/RuntimeUnitTestToolkit/releases/download/2.4.0/RuntimeUnitTestToolkit.2.4.0.unitypackage --output RuntimeUnitTestToolkit.unitypackage
- name: import test runner package (RuntimeUnitTestToolkit)
run: |
/usr/bin/unity-editor \
-projectPath "$(pwd)" \
-quit -batchmode -nographics -silent-crashes -logFile \
-importPackage "$(pwd)/RuntimeUnitTestToolkit.unitypackage"
- name: built unit-tests (Linux64, mono)
run: |
/usr/bin/unity-editor \
-projectPath "$(pwd)" \
-quit -batchmode -nographics -silent-crashes -logFile \
-executeMethod UnitTestBuilder.BuildUnitTest \
/headless /ScriptBackend Mono2x /BuildTarget StandaloneLinux64
- name: run unit-tests
run: |
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
./bin/UnitTest/StandaloneLinux64_Mono2x/test