Skip to content

Commit 5addfd6

Browse files
Erik Bylundkirre-bylund
authored andcommitted
Parallellalize zerodep and newtonsoft tests
1 parent 66e2809 commit 5addfd6

File tree

1 file changed

+9
-32
lines changed

1 file changed

+9
-32
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,69 +22,46 @@ jobs:
2222
matrix:
2323
testMode:
2424
- playmode
25-
# No tests yet, commented out for efficiency
26-
#- editmode
2725
unityVersion:
2826
- 2019.4.40f1
2927
- 2020.3.48f1
3028
- 2021.3.29f1
3129
- 2022.3.7f1
30+
jsonLibrary:
31+
- zerodep
32+
- newtonsoft
3233
steps:
3334
- name: Checkout this repository
3435
uses: actions/checkout@v2
35-
3636
- name: Checkout test repository
3737
uses: actions/checkout@v2
3838
with:
3939
repository: LootLocker/unity-sdk-tests
4040
path: ./tests~ # Unity ignores folders with ~ from inclusion
41-
4241
- name: Set SDK path in test repo
4342
run: sudo chmod 777 ./tests~/switchLootLockerDependency.sh && ./tests~/switchLootLockerDependency.sh "./tests~/" "file:../../"
44-
4543
- name: Cache Libraries
4644
uses: actions/cache@v2
4745
with:
4846
path: tests~/Library
49-
key: Library-${{ matrix.unityVersion }}-${{ matrix.testMode }}
47+
key: Library-${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ matrix.jsonLibrary }}
5048
restore-keys: Library-
51-
52-
- name: Run tests ${{ matrix.unityVersion }}-${{ matrix.testMode }} with ZeroDepJSON
53-
uses: game-ci/unity-test-runner@v2
54-
id: tests
55-
env:
56-
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
57-
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
58-
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
59-
with:
60-
testMode: ${{ matrix.testMode }}
61-
checkName: ${{ matrix.unityVersion }}-${{ matrix.testMode }} Test Results
62-
artifactsPath: ${{ matrix.unityVersion }}-${{ matrix.testMode }}-artifacts
63-
projectPath: tests~/
64-
unityVersion: ${{ matrix.unityVersion }}
65-
githubToken: ${{ secrets.GITHUB_TOKEN }}
66-
customParameters: -apikey ${{ secrets.LOOTLOCKER_API_KEY }} -domainkey ${{ secrets.LOOTLOCKER_DOMAIN_KEY }}
6749
- name: Configure LootLocker to use Newtonsoft JSON
50+
if: ${{ matrix.jsonLibrary == 'newtonsoft' }}
6851
run: |
6952
sed -i 's/NO_LOOTLOCKER_USE_NEWTONSOFTJSON/LOOTLOCKER_USE_NEWTONSOFTJSON/' tests~/ProjectSettings/ProjectSettings.asset
70-
- name: Run tests ${{ matrix.unityVersion }}-${{ matrix.testMode }} with Newtonsoft JSON
53+
- name: Run tests ${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ matrix.jsonLibrary }}
7154
uses: game-ci/unity-test-runner@v2
72-
id: tests2
55+
id: tests
7356
env:
7457
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
7558
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
7659
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
7760
with:
7861
testMode: ${{ matrix.testMode }}
79-
checkName: ${{ matrix.unityVersion }}-${{ matrix.testMode }} Newtonsoft Test Results
80-
artifactsPath: ${{ matrix.unityVersion }}-${{ matrix.testMode }}-newtonsoft-artifacts
62+
checkName: ${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ matrix.jsonLibrary }} Test Results
63+
artifactsPath: ${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ matrix.jsonLibrary }}-artifacts
8164
projectPath: tests~/
8265
unityVersion: ${{ matrix.unityVersion }}
8366
githubToken: ${{ secrets.GITHUB_TOKEN }}
8467
customParameters: -apikey ${{ secrets.LOOTLOCKER_API_KEY }} -domainkey ${{ secrets.LOOTLOCKER_DOMAIN_KEY }}
85-
86-
# Commented out because as of right now it doesn't expand the test results, just repeat pass/fail
87-
#- uses: actions/upload-artifact@v2
88-
# with:
89-
# name: Test results for ${{ matrix.unityVersion }}-${{ matrix.testMode }}
90-
# path: ${{ steps.tests.outputs.artifactsPath }}

0 commit comments

Comments
 (0)