Skip to content

Upload evergreen test results to codecov.io #1736

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
wants to merge 3 commits into
base: v2.x
Choose a base branch
from

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Jul 24, 2025

In order to better use the flaky test feature of codecov.io, this PR adds a step to upload the test result file to codecov.io, as is already done for GitHub Actions.

@alcaeus alcaeus requested a review from jmikola July 24, 2025 11:56
@alcaeus alcaeus requested a review from a team as a code owner July 24, 2025 11:56
@codecov-commenter
Copy link

codecov-commenter commented Jul 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.54%. Comparing base (ad6442c) to head (9ad2fff).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##               v2.x    #1736   +/-   ##
=========================================
  Coverage     87.54%   87.54%           
  Complexity     3182     3182           
=========================================
  Files           423      423           
  Lines          6336     6336           
=========================================
  Hits           5547     5547           
  Misses          789      789           
Flag Coverage Δ
6.0-replica_set 85.65% <ø> (ø)
6.0-server 81.66% <ø> (ø)
6.0-sharded_cluster 85.24% <ø> (ø)
8.0-replica_set 87.46% <ø> (ø)
8.0-server 82.54% <ø> (ø)
8.0-sharded_cluster 87.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alcaeus alcaeus force-pushed the evergreen-codecov-test-upload branch from 3a4b6e4 to 9ad2fff Compare July 24, 2025 12:15
working_dir: src
script: |
${PREPARE_SHELL}
curl -Os https://cli.codecov.io/latest/linux/codecov
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this isn't be pulled from a repository, it'd be prudent to integrity check the binary. I noted this didn't apply to the earlier GitHub Action integration (ae31f00) since you just reference their action (codecov/test-results-action).

printf "\n" >> mo-expansion.yml
printf "MONGODB_VERSION: '%s'\n" "${MONGODB_VERSION}" >> mo-expansion.yml
printf "TOPOLOGY: '%s'\n" "${TOPOLOGY}" >> mo-expansion.yml
cat mo-expansion.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this necessary? $MONGODB_VERSION and $TOPOLOGY should already be available in the environment, since they're referenced in the previous shell.exec command. The inclusion of cat here also looks like it may be leftover debugging.

Based on the comment below, expansions.update was only necessary to add
MONGODB_URI and CRYPT_SHARED_LIB_PATH, which are written in drivers_orchestration.py.

--report-type test_results \
--disable-search \
--fail-on-error \
--token ${CODECOV_TOKEN} \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this reference a variable from the Evergreen project config? I didn't see this when taking a look at the PHPLIB 2.x project settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants