Updated test cases in main.yml

pull/182/head
Nick Maltbie 2022-04-18 23:27:32 -04:00
parent 849404de92
commit 2e6c7ac4f3
1 changed files with 4 additions and 53 deletions

View File

@ -105,6 +105,8 @@ jobs:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
testMode: all
coverageParameters: 'enableCyclomaticComplexity;generateHtmlReport;generateBadgeReport;assemblyFilters:+MyScripts'
coverageResultsPath: 'artifacts'
# Test implicit artifactsPath, by not setting it
# Upload artifacts
@ -209,57 +211,6 @@ jobs:
path: ${{ steps.playMode.outputs.artifactsPath }}
retention-days: 14
testCodeCoverage:
name: Test Code Coverage 📏
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unityVersion:
- 2019.2.11f1
projectPath:
- unity-project-with-correct-tests
testMode:
- playmode
- editmode
- all
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: coveragetests
uses: ./
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
testMode: ${{ matrix.testMode }}
coverageParameters: 'enableCyclomaticComplexity;generateHtmlReport;generateBadgeReport;assemblyFilters:+MyScripts'
# Upload artifacts
- name: Upload code coverage results
uses: actions/upload-artifact@v3
with:
name: Code coverage results (${{ matrix.testMode }} mode)
path: coverage
retention-days: 7
testEachModeSequentially:
name: Test each mode sequentially 👩‍👩‍👧‍👦 # don't try this at home (it's much slower)
runs-on: ubuntu-latest
@ -297,7 +248,7 @@ jobs:
unityVersion: ${{ matrix.unityVersion }}
testMode: editmode
artifactsPath: artifacts/editmode
coverageResultsPath: coverage/editmode
coverageResultsPath: artifacts/editmode
# Configure second test runner
- name: Tests in playmode 📺
@ -307,7 +258,7 @@ jobs:
unityVersion: ${{ matrix.unityVersion }}
testMode: playmode
artifactsPath: artifacts/playmode
coverageResultsPath: coverage/playmode
coverageResultsPath: artifacts/playmode
# Upload combined artifacts
- name: Upload combined test results