-
-
Notifications
You must be signed in to change notification settings - Fork 638
69 lines (62 loc) · 1.66 KB
/
test.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
# Secrets
# UNITY_LICENSE:
name: test
on:
push:
branches:
- develop
tags:
- "!*"
pull_request:
types:
- opened
- synchronize
jobs:
setup:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.setup.outputs.versions }}
steps:
- id: setup
run: |
VERSIONS=`npx unity-changeset list --versions --all --latest-patch --min 2018.3 --json`
echo "==== Target Unity Versions ===="
echo "${VERSIONS}"
echo "::set-output name=versions::${VERSIONS}"
test:
runs-on: ubuntu-latest
needs: setup
strategy:
fail-fast: false
matrix:
version: ${{ fromJson(needs.setup.outputs.versions) }}
steps:
# Checkout sandbox project
- uses: actions/checkout@v3
with:
ref: sandbox
submodules: true
fetch-depth: 0
# Update package submodule
- name: "Update package submodule"
working-directory: Packages/dev
run: git checkout ${{ github.sha }}
# Cache
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ matrix.version }}-${{ github.sha }}
restore-keys: |
Library-${{ matrix.version }}-
Library-
# Run tests
- name: "Run tests"
uses: game-ci/unity-test-runner@v2
with:
customImage: mobsakai/unity3d:${{ matrix.version }}
customParameters: -nographics
# unityVersion: ${{ matrix.version }}
checkName: ${{ matrix.version }} Test Results
githubToken: ${{ github.token }}
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}