Skip to content

Commit 6d6f6d1

Browse files
committed
Fix test workflows
- Add email and password to unity-test-runner - Upgrade Unity versions running on workflows (cherry picked from commit 3385efb)
1 parent ef028b7 commit 6d6f6d1

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.github/workflows/test-integration.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ concurrency:
2424

2525
jobs:
2626
test:
27+
if: github.event.pull_request.head.repo.fork == false # Skip on public fork, because can not read secrets.
2728
runs-on: ${{ github.event.inputs.runner }}
2829
permissions:
2930
contents: read
@@ -32,9 +33,9 @@ jobs:
3233
fail-fast: false
3334
matrix:
3435
unityVersion: # Available versions see: https://game.ci/docs/docker/versions
35-
- 2021.3.31f1
36-
- 2022.3.12f1
37-
- 2023.1.18f1
36+
- 2021.3.33f1
37+
- 2022.3.15f1
38+
- 2023.2.3f1
3839

3940
steps:
4041
- name: Checkout repository
@@ -61,7 +62,7 @@ jobs:
6162
run: echo "secret_key=UNITY_LICENSE_$(echo ${{ matrix.unityVersion }} | cut -c 1-4)" >> "$GITHUB_ENV"
6263

6364
- name: Run tests
64-
uses: game-ci/unity-test-runner@v3
65+
uses: game-ci/unity-test-runner@v4
6566
with:
6667
githubToken: ${{ secrets.GITHUB_TOKEN }}
6768
unityVersion: ${{ matrix.unityVersion }} # Default is `auto`
@@ -71,6 +72,8 @@ jobs:
7172
# see: https://docs.unity3d.com/Packages/[email protected]/manual/CoverageBatchmode.html
7273
env:
7374
UNITY_LICENSE: ${{ secrets[env.secret_key] }}
75+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
76+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
7477
id: test
7578

7679
- name: Upload test results
@@ -84,10 +87,10 @@ jobs:
8487

8588
notify:
8689
needs: test
90+
if: github.event.pull_request.head.repo.fork == false # Skip on public fork, because can not read secrets.
8791
runs-on: ubuntu-latest
8892
permissions:
8993
actions: read
90-
if: always()
9194

9295
steps:
9396
- uses: Gamesight/[email protected]

.github/workflows/test.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ concurrency:
2424

2525
jobs:
2626
test:
27+
if: github.event.pull_request.head.repo.fork == false # Skip on public fork, because can not read secrets.
2728
runs-on: ubuntu-latest
2829
permissions:
2930
contents: read
@@ -33,11 +34,11 @@ jobs:
3334
fail-fast: false
3435
matrix:
3536
unityVersion: # Available versions see: https://game.ci/docs/docker/versions
36-
- 2021.3.31f1
37-
- 2022.3.12f1
38-
- 2023.1.18f1
37+
- 2021.3.33f1
38+
- 2022.3.15f1
39+
- 2023.2.3f1
3940
include:
40-
- unityVersion: 2021.3.31f1
41+
- unityVersion: 2021.3.33f1
4142
octocov: true
4243

4344
steps:
@@ -65,7 +66,7 @@ jobs:
6566
run: echo "secret_key=UNITY_LICENSE_$(echo ${{ matrix.unityVersion }} | cut -c 1-4)" >> "$GITHUB_ENV"
6667

6768
- name: Run tests
68-
uses: game-ci/unity-test-runner@v3
69+
uses: game-ci/unity-test-runner@v4
6970
with:
7071
githubToken: ${{ secrets.GITHUB_TOKEN }}
7172
unityVersion: ${{ matrix.unityVersion }} # Default is `auto`
@@ -75,6 +76,8 @@ jobs:
7576
# see: https://docs.unity3d.com/Packages/[email protected]/manual/CoverageBatchmode.html
7677
env:
7778
UNITY_LICENSE: ${{ secrets[env.secret_key] }}
79+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
80+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
7881
id: test
7982

8083
- name: Set coverage path for octocov
@@ -96,10 +99,10 @@ jobs:
9699

97100
notify:
98101
needs: test
102+
if: github.event.pull_request.head.repo.fork == false # Skip on public fork, because can not read secrets.
99103
runs-on: ubuntu-latest
100104
permissions:
101105
actions: read
102-
if: always()
103106

104107
steps:
105108
- uses: Gamesight/[email protected]

0 commit comments

Comments
 (0)