Skip to content

Commit b22ef09

Browse files
authored
chore: update code coverage workflow (#3163)
1 parent b85ffa0 commit b22ef09

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/generate-coverage-report.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,20 @@ jobs:
2323
matrix:
2424
# Note: ARM64 on linux/macos are not supported.
2525
# https://github.com/microsoft/codecoverage/blob/main/docs/supported-os.md
26-
os: [windows-latest, ubuntu-latest, macos-15-intel, windows-11-arm]
26+
os: [windows-latest, ubuntu-latest, macos-26-intel, windows-11-arm]
2727
steps:
2828
- uses: actions/checkout@v6
2929

30-
# Ensure DOTNET_ROOT environment variable set on macos-15-intel
30+
# Ensure DOTNET_ROOT environment variable set on macOS
3131
- uses: actions/setup-dotnet@v5
3232
with:
3333
dotnet-version: |
34-
8.x
34+
8.x
35+
36+
# Setup additional tools
37+
- name: Setup additional tools for Wasm/NativeAot tests
38+
if: ${{ github.event.inputs.skip_integration_tests == 'false'}}
39+
uses: ./.github/actions/setup-additional-tools
3540

3641
- name: Install dotnet-coverage
3742
run: dotnet tool install --global dotnet-coverage
@@ -47,10 +52,10 @@ jobs:
4752
dotnet coverage connect bdn_coverage "dotnet test tests/BenchmarkDotNet.Tests -c Release --no-build --framework net8.0"
4853
dotnet coverage connect bdn_coverage "dotnet test tests/BenchmarkDotNet.Analyzers.Tests -c Release --no-build --framework net8.0"
4954
50-
- name: Collect Code Coverage for BenchmarkDotNet.IntegrationTests
51-
if: ${{ github.event.inputs.skip_integration_tests == 'false'}}
55+
- name: Collect Code Coverage for BenchmarkDotNet.IntegrationTests
56+
if: ${{ github.event.inputs.skip_integration_tests == 'false'}}
5257
run: |
53-
dotnet coverage connect bdn_coverage 'dotnet test tests/BenchmarkDotNet.IntegrationTests -c Release --no-build --framework net8.0 --filter "(FullyQualifiedName!~DotMemoryTests) & (FullyQualifiedName!~DotTraceTests) & (FullyQualifiedName!~WasmIsSupported) & (FullyQualifiedName!~WasmSupportsInProcessDiagnosers)"'
58+
dotnet coverage connect bdn_coverage "dotnet test tests/BenchmarkDotNet.IntegrationTests -c Release --no-build --framework net8.0"
5459
5560
- name: Shutdown dotnet-coverage server.
5661
run: dotnet coverage shutdown bdn_coverage --timeout 60000
@@ -69,6 +74,10 @@ jobs:
6974
steps:
7075
- uses: actions/checkout@v6
7176

77+
- name: Setup additional tools for Wasm/NativeAot tests
78+
if: ${{ github.event.inputs.skip_integration_tests == 'false'}}
79+
uses: ./.github/actions/setup-additional-tools
80+
7281
- name: Install dotnet-coverage
7382
run: dotnet tool install --global dotnet-coverage
7483

@@ -86,7 +95,7 @@ jobs:
8695
- name: Collect Code Coverage for BenchmarkDotNet.IntegrationTests
8796
if: ${{ github.event.inputs.skip_integration_tests == 'false'}}
8897
run: |
89-
dotnet coverage connect bdn_coverage 'dotnet test tests/BenchmarkDotNet.IntegrationTests -c Release --no-build --framework net472 --filter "(FullyQualifiedName!~DotMemoryTests) & (FullyQualifiedName!~DotTraceTests) & (FullyQualifiedName!~WasmIsSupported) & (FullyQualifiedName!~WasmSupportsInProcessDiagnosers)"'
98+
dotnet coverage connect bdn_coverage 'dotnet test tests/BenchmarkDotNet.IntegrationTests -c Release --no-build --framework net472'
9099
91100
- name: Shutdown dotnet-coverage server.
92101
run: dotnet coverage shutdown bdn_coverage --timeout 60000

0 commit comments

Comments
 (0)