-
-
Notifications
You must be signed in to change notification settings - Fork 5
75 lines (65 loc) · 1.83 KB
/
main.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
name: Test
on:
pull_request: {}
push: {}
# env:
# UNITY_LICENSE_FILE: UnityLicense/2019.2.11f1.ulf
jobs:
Test:
name: Test ${{ matrix.unityVersion }} ${{ matrix.testMode }} 🔑
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unityVersion:
- 2019.4.20f1
- 2020.3.0f1
- 2021.1.0f1
steps:
# Checkout Empty Project
- name: Checkout Empty Project
uses: actions/checkout@v2
with:
repository: litefeel/UnityEmptyProject
# Set env
- name: Set env UNITY_LICENSE_FILE
run: |
echo 'UNITY_LICENSE<<EOF' >> $GITHUB_ENV
cat UnityLicense/${{ matrix.unityVersion }}.ulf >> $GITHUB_ENV
echo '' >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# Checkout this project
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true
path: Packages/MyPlugin
# Cache
- uses: actions/cache@v2
with:
path: Library
key: Library
# Test
- name: Run tests
uses: game-ci/unity-test-runner@v2
id: tests
with:
customParameters: "-nographics"
unityVersion: ${{ matrix.unityVersion }}
# # Build
# - name: Build project
# uses: litefeel/[email protected]
# with:
# unityVersion: ${{ matrix.unityVersion }}
# targetPlatform: WebGL
# Output
- uses: actions/upload-artifact@v2
name: Upload tests
with:
name: Test results for ${{ matrix.testMode }} on unity ${{ matrix.unityVersion }}
path: ${{ steps.tests.outputs.artifactsPath }}
# - uses: actions/upload-artifact@v2
# name: Upload build
# with:
# name: Build
# path: build