Merge in changes

This commit is contained in:
Aaron Trudeau
2023-05-23 20:29:00 -04:00
55 changed files with 6962 additions and 3699 deletions

4
.github/FUNDING.yml vendored
View File

@@ -1,8 +1,8 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: game-ci
patreon: # Replace with a single Patreon username
open_collective: game-ci
open_collective: # replace with a single OpenCollective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry

View File

@@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12.x
node-version: 18.x
- run: yarn
- run: yarn lint
- run: yarn test
@@ -32,10 +32,11 @@ jobs:
projectPath:
- unity-project-with-correct-tests
unityVersion:
- 2019.2.11f1
- 2019.4.40f1
testMode:
- playmode
- editmode
- standalone
steps:
###########################
# Checkout #
@@ -77,7 +78,7 @@ jobs:
projectPath:
- unity-project-with-correct-tests
unityVersion:
- 2019.2.11f1
- 2019.4.40f1
steps:
###########################
# Checkout #
@@ -105,7 +106,7 @@ jobs:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
testMode: all
coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+MyScripts'
coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+MyScripts;dontClear'
# Test implicit artifactsPath, by not setting it
# Upload artifacts
@@ -131,7 +132,7 @@ jobs:
fail-fast: false
matrix:
unityVersion:
- 2019.2.11f1
- 2019.4.40f1
projectPath:
- unity-project-with-correct-tests
steps:
@@ -188,7 +189,7 @@ jobs:
projectPath:
- unity-project-with-correct-tests
unityVersion:
- 2019.2.11f1
- 2019.4.40f1
steps:
###########################
# Checkout #
@@ -234,6 +235,107 @@ jobs:
path: ${{ steps.playMode.outputs.coveragePath }}
retention-days: 14
testRunnerInStandalone:
name: Test standalone 📺
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- unity-project-with-correct-tests
unityVersion:
- 2019.4.40f1
steps:
###########################
# Checkout #
###########################
- uses: actions/checkout@v3
with:
lfs: true
###########################
# Cache #
###########################
- uses: actions/cache@v3
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
restore-keys: |
Library-${{ matrix.projectPath }}-
Library-
# Configure test runner
- name: Run tests
id: standalone
uses: ./
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
testMode: standalone
artifactsPath: artifacts/standalone
# Upload artifacts
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: Test results (play mode)
path: ${{ steps.standalone.outputs.artifactsPath }}
retention-days: 14
testRunnerInStandaloneWithIL2CPP:
name: Test standalone with IL2CPP 📺
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- unity-project-with-correct-tests
unityVersion:
- 2019.4.40f1 # Only 2019.4+ docker images contain the IL2CPP backend installed.
steps:
###########################
# Checkout #
###########################
- uses: actions/checkout@v3
with:
lfs: true
###########################
# Cache #
###########################
- uses: actions/cache@v3
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
restore-keys: |
Library-${{ matrix.projectPath }}-
Library-
# Set scripting backend to IL2CPP
- name: Rewrite ProjectSettings
run: |
DefineOriginal=" scriptingBackend: {}"
DefineReplace=" scriptingBackend: \\n Standalone: 1"
sed -i "{s/$DefineOriginal/$DefineReplace/g}" ${{ matrix.projectPath }}/ProjectSettings/ProjectSettings.asset
# Configure test runner
- name: Run tests
id: standalone
uses: ./
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
testMode: standalone
artifactsPath: artifacts/standalone
# Upload artifacts
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: Test results (play mode)
path: ${{ steps.standalone.outputs.artifactsPath }}
retention-days: 14
testEachModeSequentially:
name: Test each mode sequentially 👩‍👩‍👧‍👦 # don't try this at home (it's much slower)
runs-on: ubuntu-latest
@@ -241,7 +343,7 @@ jobs:
fail-fast: false
matrix:
unityVersion:
- 2019.2.11f1
- 2019.4.40f1
projectPath:
- unity-project-with-correct-tests
steps:
@@ -281,6 +383,15 @@ jobs:
testMode: playmode
artifactsPath: artifacts/playmode
# Configure third test runner
- name: Tests in standalone 📺
uses: ./
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
testMode: standalone
artifactsPath: artifacts/playmode
# Upload combined artifacts
- name: Upload combined test results
uses: actions/upload-artifact@v3