Skip to content

ci: use publish code coverage results v1 #3647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .pipelines/templates/run-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ stages:
displayName: Code Coverage Check
dependsOn:
- test
- test_windows
jobs:
- job: coverage
displayName: Check Coverage
Expand All @@ -75,10 +74,6 @@ stages:
inputs:
artifact: 'linux-coverage'
path: './'
- task: DownloadPipelineArtifact@2
inputs:
artifact: 'windows-coverage'
path: './'
- bash: |
make tools
sudo ln -s $(pwd)/build/tools/bin/gocov /usr/local/bin/gocov
Expand All @@ -87,21 +82,20 @@ stages:
GOOS=linux gocov convert linux-coverage.out > linux-coverage.json
GOOS=linux gocov-xml < linux-coverage.json > linux-coverage.xml

GOOS=windows gocov convert windows-coverage.out > windows-coverage.json
GOOS=windows gocov-xml < windows-coverage.json > windows-coverage.xml
# TODO: Add windows coverage back in once PublishCodeCoverageResults v2 works with BuildQualityChecks

mkdir coverage

mv linux-coverage.xml coverage/
mv windows-coverage.xml coverage/
name: "Coverage"
displayName: "Generate Coverage Report"
condition: always()
- task: PublishCodeCoverageResults@2
- task: PublishCodeCoverageResults@1
displayName: "Publish Code Coverage Report"
condition: always()
inputs:
summaryFileLocation: coverage/*
codeCoverageTool: 'Cobertura'
summaryFileLocation: coverage/linux-coverage.xml
- task: BuildQualityChecks@8
displayName: "Check Code Coverage Regression"
condition: always()
Expand Down
Loading