This repository has been archived by the owner on Nov 29, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 1.71 KB
/
test-unity-project.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
name: Test Unity Project
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
PROJECT_PATH: UltraStar Play Companion
jobs:
test-job:
name: Test for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unityVersion:
- 2021.2.0f1
targetPlatform:
- Android
- iOS
steps:
# Clone repo and restore cache
- uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v2
with:
path: ${{ env.PROJECT_PATH }}/Library
key: Library-${{ env.PROJECT_PATH }}-${{ matrix.targetPlatform }}-${{ hashFiles(env.PROJECT_PATH) }}
restore-keys: |
Library-${{ env.PROJECT_PATH }}-${{ matrix.targetPlatform }}-
Library-${{ env.PROJECT_PATH }}-
Library-
# Run "Download Dependencies"
- name: Download Dependencies
working-directory: tools/download-dependencies
run: sh download-dependencies.sh
# Test Unity project
- uses: game-ci/unity-test-runner@b88af19d7fb34dadb854cd21a412a69c7fc448f6
id: testRunner
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: ${{ env.PROJECT_PATH }}
unityVersion: ${{ matrix.unityVersion }}
testMode: all
githubToken: ${{ secrets.GITHUB_TOKEN }}
customParameters: "-nographics"
- uses: actions/upload-artifact@v2
if: always()
with:
name: Test results (all modes)
path: ${{ steps.testRunner.outputs.artifactsPath }}