Skip to content

Commit 5b61c5d

Browse files
committed
Fix to remove codecoverage when run on integration test
1 parent d89bf7d commit 5b61c5d

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.github/workflows/test-integration.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- 2023.2.20f1
4848
- 6000.0.41f1
4949
testMode:
50-
- All # run tests in editor
50+
- PlayMode # run tests in editor
5151
include:
5252
- unityVersion: 6000.0.41f1
5353
testMode: Standalone # run tests on player
@@ -69,12 +69,10 @@ jobs:
6969
Library-${{ runner.os }}-
7070
Library-
7171
72-
- name: Set coverage assembly filters
72+
- name: Uninstall codecoverage package
7373
run: |
74-
assemblies=$(find ./Packages -name "*.asmdef" | sed -e s/.*\\//\+/ | sed -e s/\\.asmdef// | sed -e s/^.*\\.Tests//)
75-
assemblies+=("+LocalPackageSample*")
76-
# shellcheck disable=SC2001,SC2048,SC2086
77-
echo "assembly_filters=+<assets>,$(echo ${assemblies[*]} | sed -e s/\ /,/g),-*.Tests" >> "$GITHUB_ENV"
74+
npm install -g openupm-cli
75+
openupm remove com.unity.testtools.codecoverage
7876
7977
- name: Set license secret key
8078
run: echo "secret_key=UNITY_LICENSE_$(echo ${{ matrix.unityVersion }} | cut -c 1-4)" >> "$GITHUB_ENV"
@@ -85,9 +83,8 @@ jobs:
8583
githubToken: ${{ secrets.GITHUB_TOKEN }}
8684
unityVersion: ${{ matrix.unityVersion }} # Default is `auto`
8785
checkName: test result (${{ matrix.unityVersion }}, ${{ matrix.testMode }})
88-
customParameters: -testCategory "Integration"
89-
coverageOptions: generateAdditionalMetrics;generateTestReferences;generateHtmlReport;generateAdditionalReports;dontClear;assemblyFilters:${{ env.assembly_filters }}
90-
# see: https://docs.unity3d.com/Packages/[email protected]/manual/CoverageBatchmode.html
86+
customParameters: -testCategory "Integration;!IgnoreCI" -testHelperScreenshotDirectory /github/workspace/artifacts/Screenshots
87+
# Note: `/github/workspace/artifacts` is the artifacts path inside the game-ci container
9188
testMode: ${{ matrix.testMode }}
9289
env:
9390
UNITY_LICENSE: ${{ secrets[env.secret_key] }}
@@ -101,5 +98,4 @@ jobs:
10198
name: TestResults-Unity${{ matrix.unityVersion }}-${{ matrix.testMode }}
10299
path: |
103100
${{ steps.test.outputs.artifactsPath }}
104-
${{ steps.test.outputs.coveragePath }}
105101
if: always()

0 commit comments

Comments
 (0)