-
Notifications
You must be signed in to change notification settings - Fork 260
[backport] #3791 ci: only check for code coverage at merge, not release #3792
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
Conversation
|
/azp run Azure Container Networking PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refines the unit test pipeline to aggregate coverage results across modules and only run the code coverage check for PRs coming through the merge queue.
- Combine multiple
coverage-*.outfiles into a single report before publishing. - Add a conditional to run the
code_coveragestage only when the branch name matches the merge-queue pattern. - Initialize a Go workspace (
make workspace) so coverage tooling includes all modules.
Comments suppressed due to low confidence (3)
.pipelines/templates/run-unit-tests.yaml:67
- The conditional hook is misaligned under
stages. The- ${{ if … }}:line should be indented according to Azure Pipelines template syntax so that thecode_coveragestage is correctly gated and parsed.
- ${{ if contains(variables['Build.SourceBranch'], 'master/pr') }}:
.pipelines/templates/run-unit-tests.yaml:67
- [nitpick] Using a hard-coded branch pattern
'master/pr'can be brittle. Consider parameterizing this pattern in your pipeline variables or templates for easier updates and reuse.
- ${{ if contains(variables['Build.SourceBranch'], 'master/pr') }}:
.pipelines/templates/run-unit-tests.yaml:30
- If no files match
coverage-*.out, thetailcommand will fail and break the pipeline. Consider checking for file existence or using a glob-safe approach to avoid errors when coverage files are absent.
(echo "mode: atomic"; tail -q -n +2 coverage-*.out) > coverage.cover
|
Azure Pipelines failed to run 1 pipeline(s). |
41235cb to
1eb12b4
Compare
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1eb12b4 to
9f2610e
Compare
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Reason for Change:
See #3791
Issue Fixed:
Requirements:
Notes: