From 2e6c7ac4f3f4b43f90b80f1507d4ec5392200a9d Mon Sep 17 00:00:00 2001 From: Nick Maltbie Date: Mon, 18 Apr 2022 23:27:32 -0400 Subject: [PATCH] Updated test cases in main.yml --- .github/workflows/main.yml | 57 +++----------------------------------- 1 file changed, 4 insertions(+), 53 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7df2795..048a627 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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