@@ -22,69 +22,46 @@ jobs:
22
22
matrix :
23
23
testMode :
24
24
- playmode
25
- # No tests yet, commented out for efficiency
26
- # - editmode
27
25
unityVersion :
28
26
- 2019.4.40f1
29
27
- 2020.3.48f1
30
28
- 2021.3.29f1
31
29
- 2022.3.7f1
30
+ jsonLibrary :
31
+ - zerodep
32
+ - newtonsoft
32
33
steps :
33
34
- name : Checkout this repository
34
35
uses : actions/checkout@v2
35
-
36
36
- name : Checkout test repository
37
37
uses : actions/checkout@v2
38
38
with :
39
39
repository : LootLocker/unity-sdk-tests
40
40
path : ./tests~ # Unity ignores folders with ~ from inclusion
41
-
42
41
- name : Set SDK path in test repo
43
42
run : sudo chmod 777 ./tests~/switchLootLockerDependency.sh && ./tests~/switchLootLockerDependency.sh "./tests~/" "file:../../"
44
-
45
43
- name : Cache Libraries
46
44
uses : actions/cache@v2
47
45
with :
48
46
path : tests~/Library
49
- key : Library-${{ matrix.unityVersion }}-${{ matrix.testMode }}
47
+ key : Library-${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ matrix.jsonLibrary }}
50
48
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 }}
67
49
- name : Configure LootLocker to use Newtonsoft JSON
50
+ if : ${{ matrix.jsonLibrary == 'newtonsoft' }}
68
51
run : |
69
52
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 }}
71
54
uses : game-ci/unity-test-runner@v2
72
- id : tests2
55
+ id : tests
73
56
env :
74
57
UNITY_LICENSE : ${{ secrets.UNITY_LICENSE }}
75
58
UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
76
59
UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
77
60
with :
78
61
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
81
64
projectPath : tests~/
82
65
unityVersion : ${{ matrix.unityVersion }}
83
66
githubToken : ${{ secrets.GITHUB_TOKEN }}
84
67
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