@@ -27,11 +27,15 @@ jobs:
2727 # - run: yarn build --quiet && git diff --quiet action || { echo "ERROR - index.js is different from repository version. Forgot to run `yarn build`?" ; exit 62; }
2828
2929 testAllModesLikeInTheReadme :
30- name : Test in ${{ matrix.testMode }} on version ${{ matrix.unityVersion }}
31- runs-on : ubuntu-latest
30+ name : Test in ${{ matrix.testMode }} of version ${{ matrix.unityVersion }} on ${{ matrix.baseRunner }}
31+ runs-on : ${{ matrix.baseRunner }}
3232 strategy :
3333 fail-fast : false
34+ max-parallel : 2
3435 matrix :
36+ baseRunner :
37+ - ubuntu-latest
38+ - windows-latest
3539 projectPath :
3640 - unity-project-with-correct-tests
3741 unityVersion :
5761 - uses : actions/cache@v3
5862 with :
5963 path : ${{ matrix.projectPath }}/Library
60- key : Library-${{ matrix.projectPath }}
64+ key : Library-${{ matrix.baseRunner }}-${{ matrix. projectPath }}
6165 restore-keys : |
62- Library-
66+ Library-${{ matrix.baseRunner }}
6367 - uses : ./
6468 id : tests
6569 with :
@@ -76,10 +80,13 @@ jobs:
7680
7781 testRunnerInAllModes :
7882 name : Test all modes β¨
79- runs-on : ubuntu-latest
83+ runs-on : ${{ matrix.baseRunner }}
8084 strategy :
8185 fail-fast : false
8286 matrix :
87+ baseRunner :
88+ - ubuntu-latest
89+ - windows-latest
8390 projectPath :
8491 - unity-project-with-correct-tests
8592 unityVersion :
@@ -100,10 +107,9 @@ jobs:
100107 - uses : actions/cache@v3
101108 with :
102109 path : ${{ matrix.projectPath }}/Library
103- key : Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
110+ key : Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
104111 restore-keys : |
105- Library-${{ matrix.projectPath }}-
106- Library-
112+ Library-${{ matrix.baseRunner }}
107113
108114 # Configure test runner
109115 - name : Run tests
@@ -134,10 +140,13 @@ jobs:
134140
135141 testRunnerInEditMode :
136142 name : Test edit mode π
137- runs-on : ubuntu-latest
143+ runs-on : ${{ matrix.baseRunner }}
138144 strategy :
139145 fail-fast : false
140146 matrix :
147+ baseRunner :
148+ - ubuntu-latest
149+ - windows-latest
141150 unityVersion :
142151 - 2022.3.13f1
143152 - 2023.1.19f1
@@ -161,10 +170,9 @@ jobs:
161170 - uses : actions/cache@v3
162171 with :
163172 path : ${{ matrix.projectPath }}/Library
164- key : Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
173+ key : Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
165174 restore-keys : |
166- Library-${{ matrix.projectPath }}-
167- Library-
175+ Library-${{ matrix.baseRunner }}
168176
169177 # Configure test runner
170178 - name : Run tests
@@ -195,10 +203,13 @@ jobs:
195203
196204 testRunnerInPlayMode :
197205 name : Test play mode πΊ
198- runs-on : ubuntu-latest
206+ runs-on : ${{ matrix.baseRunner }}
199207 strategy :
200208 fail-fast : false
201209 matrix :
210+ baseRunner :
211+ - ubuntu-latest
212+ - windows-latest
202213 projectPath :
203214 - unity-project-with-correct-tests
204215 unityVersion :
@@ -219,10 +230,9 @@ jobs:
219230 - uses : actions/cache@v3
220231 with :
221232 path : ${{ matrix.projectPath }}/Library
222- key : Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
233+ key : Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
223234 restore-keys : |
224- Library-${{ matrix.projectPath }}-
225- Library-
235+ Library-${{ matrix.baseRunner }}
226236
227237 # Configure test runner
228238 - name : Run tests
@@ -252,10 +262,13 @@ jobs:
252262
253263 testRunnerInStandalone :
254264 name : Test standalone πΊ
255- runs-on : ubuntu-latest
265+ runs-on : ${{ matrix.baseRunner }}
256266 strategy :
257267 fail-fast : false
258268 matrix :
269+ baseRunner :
270+ - ubuntu-latest
271+ - windows-latest
259272 projectPath :
260273 - unity-project-with-correct-tests
261274 unityVersion :
@@ -276,10 +289,10 @@ jobs:
276289 - uses : actions/cache@v3
277290 with :
278291 path : ${{ matrix.projectPath }}/Library
279- key : Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
292+ key : Library-${{ matrix.baseRunner }}-${{ matrix. projectPath }}-${{ matrix.targetPlatform }}
280293 restore-keys : |
281- Library-${{ matrix.projectPath }}-
282- Library-
294+ Library-${{ matrix.baseRunner }}-${{ matrix. projectPath }}-
295+ Library-${{ matrix.baseRunner }}-
283296
284297 # Configure test runner
285298 - name : Run tests
@@ -301,10 +314,13 @@ jobs:
301314
302315 testRunnerInStandaloneWithIL2CPP :
303316 name : Test standalone with IL2CPP πΊ
304- runs-on : ubuntu-latest
317+ runs-on : ${{ matrix.baseRunner }}
305318 strategy :
306319 fail-fast : false
307320 matrix :
321+ baseRunner :
322+ - ubuntu-latest
323+ - windows-latest
308324 projectPath :
309325 - unity-project-with-correct-tests
310326 unityVersion :
@@ -325,17 +341,17 @@ jobs:
325341 - uses : actions/cache@v3
326342 with :
327343 path : ${{ matrix.projectPath }}/Library
328- key : Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
344+ key : Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
329345 restore-keys : |
330- Library-${{ matrix.projectPath }}-
331- Library-
346+ Library-${{ matrix.baseRunner }}-
332347
333348 # Set scripting backend to IL2CPP
334349 - name : Rewrite ProjectSettings
335350 run : |
336351 DefineOriginal=" scriptingBackend: {}"
337352 DefineReplace=" scriptingBackend: \\n Standalone: 1"
338353 sed -i "{s/$DefineOriginal/$DefineReplace/g}" ${{ matrix.projectPath }}/ProjectSettings/ProjectSettings.asset
354+ shell : bash
339355
340356 # Configure test runner
341357 - name : Run tests
@@ -357,10 +373,13 @@ jobs:
357373
358374 testEachModeSequentially :
359375 name : Test each mode sequentially π©βπ©βπ§βπ¦ # don't try this at home (it's much slower)
360- runs-on : ubuntu-latest
376+ runs-on : ${{ matrix.baseRunner }}
361377 strategy :
362378 fail-fast : false
363379 matrix :
380+ baseRunner :
381+ - ubuntu-latest
382+ - windows-latest
364383 unityVersion :
365384 - 2022.3.13f1
366385 - 2023.1.19f1
@@ -381,10 +400,9 @@ jobs:
381400 - uses : actions/cache@v3
382401 with :
383402 path : ${{ matrix.projectPath }}/Library
384- key : Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
403+ key : Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
385404 restore-keys : |
386- Library-${{ matrix.projectPath }}-
387- Library-
405+ Library-${{ matrix.baseRunner }}-
388406
389407 # Configure first test runner
390408 - name : Tests in editmode π
0 commit comments