Skip to content

Commit a7d2869

Browse files
committed
Add individual Unity editor test workflows for multiple versions
1 parent cf715aa commit a7d2869

File tree

9 files changed

+161
-53
lines changed

9 files changed

+161
-53
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Editor Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
editor-tests:
13+
uses: ./.github/workflows/main.yml
14+
with:
15+
projectPath: './'
16+
unityVersion: '2019.4.40f1'
17+
testMode: 'editmode'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Editor Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
editor-tests:
13+
uses: ./.github/workflows/main.yml
14+
with:
15+
projectPath: './'
16+
unityVersion: '2020.3.40f1'
17+
testMode: 'editmode'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Editor Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
editor-tests:
13+
uses: ./.github/workflows/main.yml
14+
with:
15+
projectPath: './'
16+
unityVersion: '2021.3.45f1'
17+
testMode: 'editmode'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Editor Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
editor-tests:
13+
uses: ./.github/workflows/main.yml
14+
with:
15+
projectPath: './'
16+
unityVersion: '2022.3.57f1'
17+
testMode: 'editmode'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Editor Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
editor-tests:
13+
uses: ./.github/workflows/main.yml
14+
with:
15+
projectPath: './'
16+
unityVersion: '2023.1.20f1'
17+
testMode: 'editmode'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Editor Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
editor-tests:
13+
uses: ./.github/workflows/main.yml
14+
with:
15+
projectPath: './'
16+
unityVersion: '2023.2.20f1'
17+
testMode: 'editmode'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Editor Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
editor-tests:
13+
uses: ./.github/workflows/main.yml
14+
with:
15+
projectPath: './'
16+
unityVersion: '6000.0.37f1'
17+
testMode: 'editmode'

.github/workflows/main.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Editor Tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
projectPath:
7+
required: true
8+
type: string
9+
unityVersion:
10+
required: true
11+
type: string
12+
testMode:
13+
required: true
14+
type: string
15+
16+
jobs:
17+
test:
18+
name: ${{ inputs.unityVersion }} ${{ inputs.testMode }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
lfs: false
24+
- uses: actions/cache@v4
25+
with:
26+
path: ${{ inputs.projectPath }}/Library
27+
key: Library-${{ inputs.unityVersion }}
28+
restore-keys: |
29+
Library-
30+
- uses: game-ci/unity-test-runner@v4
31+
id: tests
32+
env:
33+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
34+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
35+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
36+
with:
37+
projectPath: ${{ inputs.projectPath }}
38+
unityVersion: ${{ inputs.unityVersion }}
39+
testMode: ${{ inputs.testMode }}
40+
artifactsPath: ${{ inputs.testMode }}-artifacts
41+
githubToken: ${{ secrets.GITHUB_TOKEN }}
42+
checkName: ${{ inputs.unityVersion }} ${{ inputs.testMode }} Test Results

.github/workflows/unity-tests.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)