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

feat: add codecov to the project #3168

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

vishvamsinh28
Copy link
Contributor

@vishvamsinh28 vishvamsinh28 commented Aug 28, 2024

This PR integrates Codecov into our CI workflow to enhance the visibility of our test coverage across the codebase. By adding Codecov, we aim to:

  1. Codecov will provide detailed reports on which lines of code are being covered by our tests and highlight any gaps in coverage. This helps identify areas that require additional testing.

  2. With Codecov, every PR will now include a comment indicating the impact on test coverage. This ensures that as new features or bug fixes are added, we can maintain or improve the test coverage, ensuring code quality remains high.

How Codecov Will Be Used:

Codecov is integrated with the CI workflow. Once tests are run, the coverage reports will be uploaded to Codecov.

  • Install the Codecov app for this repository.
  • Add the Codecov token to the repository secrets.

Codecov setup in forked repe :- vishvamsinh28#7
Codecov report for tests in forked repo :- vishvamsinh28#8

Copy link

netlify bot commented Aug 28, 2024

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 6dab16d
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/66fa5d5b830d760009a00ee2
😎 Deploy Preview https://deploy-preview-3168--asyncapi-website.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.

@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 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 ☂️

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Aug 28, 2024

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 39
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on undefined

@akshatnema akshatnema added the gsoc This label should be used for issues or discussions related to ideas for Google Summer of Code label Aug 28, 2024
@anshgoyalevil
Copy link
Member

Is there a way we can see the codecov coverage report before merging this PR?

@vishvamsinh28
Copy link
Contributor Author

Is there a way we can view the Codecov coverage report before merging this PR?

I tried testing it by opening a PR in my forked repo, but it didn't work, so I guess not 😅.

However, based on this comment, I think we're good to go.

Copy link
Member

@akshatnema akshatnema left a comment

Choose a reason for hiding this comment

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

@vishvamsinh28 Add following things in the PR:

  • Add proper PR description on why codecov is being added and how it will be used.
  • Add test runs for this branch in your forked PR and add the test workflow links in PR description.

.github/workflows/if-nodejs-pr-testing.yml Outdated Show resolved Hide resolved
@vishvamsinh28
Copy link
Contributor Author

vishvamsinh28 commented Aug 31, 2024

Added links to my PRs in forked repo

@anshgoyalevil @akshatnema

@sambhavgupta0705
Copy link
Member

@vishvamsinh28 can you please provide the PR link where we can have a look on the working of this feature

@anshgoyalevil
Copy link
Member

@vishvamsinh28 Let's add that in this PR only. Kindly make changes.

@vishvamsinh28
Copy link
Contributor Author

@anshgoyalevil sure 👍

@vishvamsinh28
Copy link
Contributor Author

@anshgoyalevil I tried different configurations, but I'm not getting the desired results. I believe the setup we have in this PR provides what we need. We should merge it and test with and without the flag.

@akshatnema
Copy link
Member

@vishvamsinh28 Kindly resolve the conflicts in this PR.

@vishvamsinh28
Copy link
Contributor Author

@akshatnema Conflicts Resolved.

@sambhavgupta0705
Copy link
Member

/update

@@ -1,7 +1,8 @@
module.exports = {
verbose: true,
collectCoverage: true,
collectCoverageFrom: ['scripts/**/*.js'],
Copy link
Member

Choose a reason for hiding this comment

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

Why did you remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need that jest will only include files that are directly imported in our test files for coverage.

Copy link
Member

Choose a reason for hiding this comment

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

That's the case. Jest is now taking fixture files also into coverage, and that's wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will update it for excluding fixture files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc This label should be used for issues or discussions related to ideas for Google Summer of Code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants