Skip to content
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

Adding Codecov #17304

Merged
merged 15 commits into from
Sep 11, 2024
Merged

Adding Codecov #17304

merged 15 commits into from
Sep 11, 2024

Conversation

guidari
Copy link
Contributor

@guidari guidari commented Aug 30, 2024

Closes #17124

This PR is adding Codecov to make sure we are aware of testing when updating or creating a component. Codecov only has access to carbon repository.

We will not see any CI or comments in this PR. We first need to merge this PR so Codecov will sync everything.

  • "Once merged to your default branch, subsequent pull requests will have Codecov checks and comments."

Changelog

New

  • Added new SECRET called CODECOV_TOKEN to settings inside carbon repository.
  • Added Codecov app inside Settings > GitHub Apps
  • Added codecov.yml to configure the codecov.

Changed

  • Now the test in CI runs --collectCoverage to push the report to Codecov

Testing / Reviewing

@guidari guidari added the type: infrastructure 🤖 Issues relating to devops, tech debt, etc. label Aug 30, 2024
@guidari guidari requested review from a team as code owners August 30, 2024 13:36
Copy link

netlify bot commented Aug 30, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 5d952e1
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66e055b8535e2b000820b689
😎 Deploy Preview https://deploy-preview-17304--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 30, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5d952e1
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66e055b8fee18f00083986ef
😎 Deploy Preview https://deploy-preview-17304--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@guidari guidari changed the title Adding Codecov WIP: Adding Codecov Aug 30, 2024
Copy link

codecov bot commented Sep 2, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@guidari guidari changed the title WIP: Adding Codecov Adding Codecov Sep 2, 2024
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Hey, this is a great start! I didn't realize components is a new feature codecov recommends instead of flags so you don't have to upload multiple coverage reports (one for each flag). One caveat I saw there:

if you require per-flag coverage trend information and UI support immediately, then it is recommend to use Flags for the time being

I don't think trend information is necessary right now, but worth noting. We should explore the UI once this is merged to see if we can get the information we want.


We might want to consider a few other pieces before merging:

  • Move the config file to .github/codecov.yml. I don't see documented support for per-package configs in the docs. Did you find docs for multiple config files in a single repo?
  • Update the config file to configure a component entry for each package that has tests ran on yarn test - react, colors, upgrade, styles, etc.
  • Make the status checks non-blocking for now

What do you think about these?

@guidari
Copy link
Contributor Author

guidari commented Sep 5, 2024

Hey @tay1orjones
The report in the comment it will look like that: guidari#9, I'm trying to understand why it didn't change the percentage there with my commit. Maybe I'm missing something

And one other thing. It is the first time I configured a SHA. I kinda follow what you did in your PR here, and grabbed the last commit from the action that I need, which it is this one, but I'm not sure if that is the right way.

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Looks great to me! I confirmed the SHA matches the tagged release in the repo for that action.

@tay1orjones tay1orjones added this pull request to the merge queue Sep 11, 2024
Merged via the queue into carbon-design-system:main with commit 3e92444 Sep 11, 2024
23 checks passed
@carbon-automation
Copy link
Contributor

Hey there! v11.66.0 was just released that references this issue/PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready to merge 🎉 type: infrastructure 🤖 Issues relating to devops, tech debt, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement code coverage tooling
4 participants