This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.68 KB
/
CI.yaml
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
name: Automatic CI 🤖
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
on:
pull_request:
workflow_dispatch:
jobs:
testRunner:
name: Test in ${{ matrix.testMode }} ✨
runs-on: ubuntu-latest
permissions: write-all
strategy:
fail-fast: false
matrix:
testMode:
- EditMode
- PlayMode
steps:
- name: Checkout code ✅
uses: actions/checkout@v4
- name: Create LFS file list 📜
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache 🔄
uses: actions/cache@v3
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
- name: Git LFS Pull 📥
run: |
git lfs pull
git add .
git reset --hard
- name: Restore Library cache 🔄
uses: actions/cache@v3
with:
path: Library
key: Library-test-project-${{ matrix.targetPlatform }}
restore-keys: |
Library-test-project-
Library-
- name: Run ${{ matrix.testMode }} Tests ⏯ 📑
id: runningTest
uses: game-ci/[email protected]
with:
projectPath: ${{ vars.projectPath }}
testMode: ${{ matrix.testMode }}
checkName: ${{ matrix.testMode }} test results
githubToken: ${{ secrets.GITHUB_TOKEN }}
# Upload artifacts
- name: Upload Artifact 📦
uses: actions/upload-artifact@v3
with:
name: Test results (${{ matrix.testMode }}) 📑
path: ${{ steps.runningTest.outputs.artifactsPath }}