Add windows runner tests

pull/257/head
Sokuhatiku 2024-01-05 00:50:38 +09:00
parent e23ab9e3f6
commit b46f887550
1 changed files with 46 additions and 28 deletions

View File

@ -27,11 +27,15 @@ jobs:
# - run: yarn build --quiet && git diff --quiet action || { echo "ERROR - index.js is different from repository version. Forgot to run `yarn build`?" ; exit 62; } # - run: yarn build --quiet && git diff --quiet action || { echo "ERROR - index.js is different from repository version. Forgot to run `yarn build`?" ; exit 62; }
testAllModesLikeInTheReadme: testAllModesLikeInTheReadme:
name: Test in ${{ matrix.testMode }} on version ${{ matrix.unityVersion }} name: Test in ${{ matrix.testMode }} of version ${{ matrix.unityVersion }} on ${{ matrix.baseRunner }}
runs-on: ubuntu-latest runs-on: ${{ matrix.baseRunner }}
strategy: strategy:
fail-fast: false fail-fast: false
max-parallel: 2
matrix: matrix:
baseRunner:
- ubuntu-latest
- windows-latest
projectPath: projectPath:
- unity-project-with-correct-tests - unity-project-with-correct-tests
unityVersion: unityVersion:
@ -57,9 +61,9 @@ jobs:
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: ${{ matrix.projectPath }}/Library path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }} key: Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
restore-keys: | restore-keys: |
Library- Library-${{ matrix.baseRunner }}
- uses: ./ - uses: ./
id: tests id: tests
with: with:
@ -76,10 +80,13 @@ jobs:
testRunnerInAllModes: testRunnerInAllModes:
name: Test all modes ✨ name: Test all modes ✨
runs-on: ubuntu-latest runs-on: ${{ matrix.baseRunner }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
baseRunner:
- ubuntu-latest
- windows-latest
projectPath: projectPath:
- unity-project-with-correct-tests - unity-project-with-correct-tests
unityVersion: unityVersion:
@ -100,10 +107,9 @@ jobs:
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: ${{ matrix.projectPath }}/Library path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} key: Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
restore-keys: | restore-keys: |
Library-${{ matrix.projectPath }}- Library-${{ matrix.baseRunner }}
Library-
# Configure test runner # Configure test runner
- name: Run tests - name: Run tests
@ -134,10 +140,13 @@ jobs:
testRunnerInEditMode: testRunnerInEditMode:
name: Test edit mode 📝 name: Test edit mode 📝
runs-on: ubuntu-latest runs-on: ${{ matrix.baseRunner }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
baseRunner:
- ubuntu-latest
- windows-latest
unityVersion: unityVersion:
- 2022.3.13f1 - 2022.3.13f1
- 2023.1.19f1 - 2023.1.19f1
@ -161,10 +170,9 @@ jobs:
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: ${{ matrix.projectPath }}/Library path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} key: Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
restore-keys: | restore-keys: |
Library-${{ matrix.projectPath }}- Library-${{ matrix.baseRunner }}
Library-
# Configure test runner # Configure test runner
- name: Run tests - name: Run tests
@ -195,10 +203,13 @@ jobs:
testRunnerInPlayMode: testRunnerInPlayMode:
name: Test play mode 📺 name: Test play mode 📺
runs-on: ubuntu-latest runs-on: ${{ matrix.baseRunner }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
baseRunner:
- ubuntu-latest
- windows-latest
projectPath: projectPath:
- unity-project-with-correct-tests - unity-project-with-correct-tests
unityVersion: unityVersion:
@ -219,10 +230,9 @@ jobs:
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: ${{ matrix.projectPath }}/Library path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} key: Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
restore-keys: | restore-keys: |
Library-${{ matrix.projectPath }}- Library-${{ matrix.baseRunner }}
Library-
# Configure test runner # Configure test runner
- name: Run tests - name: Run tests
@ -252,10 +262,13 @@ jobs:
testRunnerInStandalone: testRunnerInStandalone:
name: Test standalone 📺 name: Test standalone 📺
runs-on: ubuntu-latest runs-on: ${{ matrix.baseRunner }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
baseRunner:
- ubuntu-latest
- windows-latest
projectPath: projectPath:
- unity-project-with-correct-tests - unity-project-with-correct-tests
unityVersion: unityVersion:
@ -276,10 +289,10 @@ jobs:
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: ${{ matrix.projectPath }}/Library path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} key: Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
restore-keys: | restore-keys: |
Library-${{ matrix.projectPath }}- Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}-
Library- Library-${{ matrix.baseRunner }}-
# Configure test runner # Configure test runner
- name: Run tests - name: Run tests
@ -301,10 +314,13 @@ jobs:
testRunnerInStandaloneWithIL2CPP: testRunnerInStandaloneWithIL2CPP:
name: Test standalone with IL2CPP 📺 name: Test standalone with IL2CPP 📺
runs-on: ubuntu-latest runs-on: ${{ matrix.baseRunner }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
baseRunner:
- ubuntu-latest
- windows-latest
projectPath: projectPath:
- unity-project-with-correct-tests - unity-project-with-correct-tests
unityVersion: unityVersion:
@ -325,10 +341,9 @@ jobs:
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: ${{ matrix.projectPath }}/Library path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} key: Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
restore-keys: | restore-keys: |
Library-${{ matrix.projectPath }}- Library-${{ matrix.baseRunner }}-
Library-
# Set scripting backend to IL2CPP # Set scripting backend to IL2CPP
- name: Rewrite ProjectSettings - name: Rewrite ProjectSettings
@ -336,6 +351,7 @@ jobs:
DefineOriginal=" scriptingBackend: {}" DefineOriginal=" scriptingBackend: {}"
DefineReplace=" scriptingBackend: \\n Standalone: 1" DefineReplace=" scriptingBackend: \\n Standalone: 1"
sed -i "{s/$DefineOriginal/$DefineReplace/g}" ${{ matrix.projectPath }}/ProjectSettings/ProjectSettings.asset sed -i "{s/$DefineOriginal/$DefineReplace/g}" ${{ matrix.projectPath }}/ProjectSettings/ProjectSettings.asset
shell: bash
# Configure test runner # Configure test runner
- name: Run tests - name: Run tests
@ -357,10 +373,13 @@ jobs:
testEachModeSequentially: testEachModeSequentially:
name: Test each mode sequentially 👩‍👩‍👧‍👦 # don't try this at home (it's much slower) name: Test each mode sequentially 👩‍👩‍👧‍👦 # don't try this at home (it's much slower)
runs-on: ubuntu-latest runs-on: ${{ matrix.baseRunner }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
baseRunner:
- ubuntu-latest
- windows-latest
unityVersion: unityVersion:
- 2022.3.13f1 - 2022.3.13f1
- 2023.1.19f1 - 2023.1.19f1
@ -381,10 +400,9 @@ jobs:
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: ${{ matrix.projectPath }}/Library path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} key: Library-${{ matrix.baseRunner }}-${{ matrix.projectPath }}
restore-keys: | restore-keys: |
Library-${{ matrix.projectPath }}- Library-${{ matrix.baseRunner }}-
Library-
# Configure first test runner # Configure first test runner
- name: Tests in editmode 📝 - name: Tests in editmode 📝