Skip to content

Commit c54032e

Browse files
committed
Update GitHub workflows
1 parent 1434a8f commit c54032e

3 files changed

Lines changed: 67 additions & 0 deletions

File tree

.github/workflows/activation.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Acquire activation file 🔑
2+
on:
3+
workflow_dispatch: {}
4+
jobs:
5+
activation:
6+
name: Request manual activation file 🔑
7+
runs-on: ubuntu-latest
8+
steps:
9+
# Request manual activation file
10+
- name: Request manual activation file
11+
id: getManualLicenseFile
12+
uses: game-ci/unity-request-activation-file@v2
13+
# Upload artifact (Unity_v20XX.X.XXXX.alf)
14+
- name: Expose as artifact
15+
uses: actions/upload-artifact@v2
16+
with:
17+
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
18+
path: ${{ steps.getManualLicenseFile.outputs.filePath }}

.github/workflows/test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Run TestRunner 📝
2+
3+
on: pull_request
4+
5+
env:
6+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
7+
8+
jobs:
9+
testRunner:
10+
name: Test all modes 📝
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Create LFS file list
17+
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
18+
19+
- name: Restore LFS cache
20+
uses: actions/cache@v2
21+
id: lfs-cache
22+
with:
23+
path: .git/lfs
24+
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
25+
26+
- name: Git LFS Pull
27+
run: |
28+
git lfs pull
29+
git add .
30+
git reset --hard
31+
32+
- name: Restore Library cache
33+
uses: actions/cache@v2
34+
with:
35+
path: Library
36+
key: Library-test-project
37+
restore-keys: |
38+
Library-test-project-
39+
Library-
40+
41+
- uses: game-ci/unity-test-runner@v2
42+
id: testRunner
43+
with:
44+
testMode: all
45+
46+
- uses: actions/upload-artifact@v2
47+
with:
48+
name: Test results (all modes)
49+
path: ${{ steps.testRunner.outputs.artifactsPath }}

0 commit comments

Comments
 (0)