Skip to content

Conversation

@baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Jan 18, 2022

Description

This PR adds code coverage generation for each build in Evergreen.

What is changing?

This PR does the following

  • Adds a function to generate code coverage for each variant run in evergreen and upload it to s3 after each variant runs
  • Adds a function (currently not used) to download all coverage reports for a patch, generate a combined coverage report and upload that to s3
  • Adds a new build variant that depends on all other variants (currently commented out) to combine all coverage reports into one and upload it to s3 (calls the above function)
Is there new documentation needed for these changes?

Nope

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: <type>(NODE-xxxx)<!>: <description>
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson marked this pull request as ready for review January 25, 2022 19:22
@baileympearson baileympearson changed the title change command to run coverage report ci(NODE-3715): Add code coverage generation to Evergreen tasks Jan 25, 2022
UNIFIED=${UNIFIED:-}
MONGODB_URI=${MONGODB_URI:-}
TEST_NPM_SCRIPT=${TEST_NPM_SCRIPT:-check:test}
TEST_NPM_SCRIPT=${TEST_NPM_SCRIPT:-check:coverage}
Copy link
Contributor

Choose a reason for hiding this comment

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

This corresponds to nyc npm run test:all so the unit tests will be repeated on every variant. Maybe we want a new script for this to just run the int tests with coverage?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good catch! Would we want a separate command to run our unit tests with coverage in CI as well? (I'm assuming we run the unit tests in CI at some already...?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes we run them 🙂 they're part of the lint task, so if you go to that script you make it run nyc in front of the unit run there, and it would also get the upload after task just fine I think?

@nbbeeken nbbeeken requested review from dariakp and durran February 1, 2022 17:09
@nbbeeken nbbeeken added the Team Review Needs review from team label Feb 1, 2022
Copy link
Contributor

@dariakp dariakp left a comment

Choose a reason for hiding this comment

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

LGTM :)

@nbbeeken nbbeeken changed the title ci(NODE-3715): Add code coverage generation to Evergreen tasks chore(NODE-3715): add code coverage generation to Evergreen tasks Feb 1, 2022
@nbbeeken nbbeeken merged commit deb8544 into main Feb 1, 2022
@nbbeeken nbbeeken deleted the NODE-3715-add-coverage-report-to-evergreen branch February 1, 2022 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team Review Needs review from team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants