-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-5467 Add codecov integration #2690
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
Open
blink1073
wants to merge
39
commits into
mongodb:master
Choose a base branch
from
blink1073:PYTHON-5467
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
dcb0851
PYTHON-5467 Add codecov integration
blink1073 2a36785
fix coverage target
blink1073 2b714fe
add codecov config
blink1073 a1a464f
generate xml report
blink1073 90aea18
allow search to find coverage file
blink1073 285ee75
fix handling of codecov
blink1073 e01d66a
debug
blink1073 399ad55
debug
blink1073 a307de8
dibug
blink1073 2383ce0
fix bin handling
blink1073 36571a9
fix dir handling
blink1073 3c6318e
try with do-upload
blink1073 8478244
fix pushd
blink1073 375c0dc
simplify
blink1073 80c7632
debug
blink1073 bf68f3d
try uv directly
blink1073 8afc9d7
upload coverage.xml
blink1073 f8b7425
update gitignore
blink1073 7708305
produce legacy file
blink1073 c77b3c9
fix coverage param
blink1073 deafed1
specify cov
blink1073 fb06afa
generate xml with coverage command
blink1073 f6ef2f3
fix coverage gen
blink1073 90ec592
fix coverage gen
blink1073 3f43d33
try with default settings
blink1073 4824a88
try again
blink1073 c5f6356
add flag config
blink1073 446a438
try setting the git server
blink1073 b717d0b
fix evg report
blink1073 84ba8e4
fix evg report
blink1073 c2a8c29
use explicit cov args
blink1073 ae5904a
cleanup
blink1073 66afe8c
fix cov usage
blink1073 d6cc0dc
fix cov usage
blink1073 ae533d2
fix cov usage
blink1073 6f19bf0
fix cov usage
blink1073 f4036fd
fix cov usage
blink1073 46d4dee
try increasing bson coverage
blink1073 1356ef1
try increasing bson coverage
blink1073 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| #!/bin/bash | ||
| # shellcheck disable=SC2154 | ||
| # Upload a coverate report to codecov. | ||
| set -eu | ||
|
|
||
| HERE=$(dirname ${BASH_SOURCE:-$0}) | ||
| ROOT=$(dirname "$(dirname $HERE)") | ||
|
|
||
| pushd $ROOT > /dev/null | ||
| export FNAME=coverage.xml | ||
|
|
||
| if [ -z "${github_pr_number:-}" ]; then | ||
| echo "This is not a PR, not running codecov" | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [ ! -f ".coverage" ]; then | ||
| echo "There are no XML test results, not running codecov" | ||
| exit 0 | ||
| fi | ||
|
|
||
| echo "Uploading..." | ||
| printf 'pr: %s\n' "$github_pr_number" | ||
| printf 'sha: %s\n' "$github_commit" | ||
| printf 'branch: %s:%s\n' "$github_author" "$github_pr_head_branch" | ||
| printf 'flag: %s-%s\n' "$build_variant" "$task_name" | ||
| printf 'file: %s\n' "$FNAME" | ||
| uv tool run --with "coverage[toml]" coverage xml | ||
| uv tool run --from codecov-cli codecovcli upload-process \ | ||
| --report-type coverage \ | ||
| --disable-search \ | ||
| --fail-on-error \ | ||
| --git-service github \ | ||
| --token ${CODECOV_TOKEN} \ | ||
| --pr ${github_pr_number} \ | ||
| --sha ${github_commit} \ | ||
| --branch "${github_author}:${github_pr_head_branch}" \ | ||
| --flag "${build_variant}-${task_name}" \ | ||
| --file $FNAME | ||
| echo "Uploading...done." | ||
|
|
||
| popd > /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,4 +41,5 @@ test/lambda/*.json | |
|
|
||
| # test results and logs | ||
| xunit-results/ | ||
| coverage.xml | ||
| server.log | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.