@@ -3,6 +3,11 @@ name: .NET Tests (collector)
33on :
44 push :
55 branches : [ "main", "master" ]
6+ paths-ignore :
7+ - " **/*.md"
8+ - " **/*.png"
9+ - " **/*.jpg"
10+ - " **/*.svg"
611 pull_request :
712 branches : [ "main", "master" ]
813 workflow_dispatch : {}
1116 test :
1217 runs-on : ubuntu-latest
1318 permissions :
14- id-token : write # only needed if you use Codecov with OIDC
19+ id-token : write # for Codecov OIDC (safe to keep)
1520
1621 strategy :
1722 matrix :
@@ -28,26 +33,27 @@ jobs:
2833 with :
2934 dotnet-version : ' 9.0.x'
3035
31- - name : ' Sanity - show files at repo root'
36+ - name : Sanity - show files at repo root
3237 run : ls -la
3338
34- - name : ' Restore'
39+ - name : Restore
3540 run : dotnet restore
3641
37- - name : ' Build (Release)'
42+ - name : Build (Release)
3843 run : dotnet build --configuration Release --no-restore
3944
40- - name : ' Test with coverage (collector → LCOV)'
45+ - name : Test with coverage (collector → LCOV)
4146 run : |
4247 dotnet test "${{ matrix.proj }}" \
48+ --configuration Release \
4349 --no-build \
4450 --collect:"XPlat Code Coverage" \
4551 --settings coverlet.runsettings \
4652 --results-directory "./TestResults/${{ matrix.name }}" \
4753 --logger "trx;LogFileName=${{ matrix.name }}.trx" \
4854 -v n
4955
50- - name : ' Upload coverage + TRX'
56+ - name : Upload coverage + TRX
5157 if : always()
5258 uses : actions/upload-artifact@v4
5359 with :
@@ -56,11 +62,11 @@ jobs:
5662 TestResults/${{ matrix.name }}/**/coverage.info
5763 TestResults/${{ matrix.name }}/**/*.trx
5864
59- - name : ' Upload to Codecov'
65+ - name : Upload to Codecov
6066 if : success()
6167 uses : codecov/codecov-action@v5
6268 with :
6369 files : TestResults/${{ matrix.name }}/**/coverage.info
6470 flags : ${{ matrix.name }}
6571 fail_ci_if_error : true
66- use_oidc : true
72+ use_oidc : true
0 commit comments