-
Notifications
You must be signed in to change notification settings - Fork 433
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
Chore: enable unit test coverage comment #2637
Conversation
Branch preview✅ Deploy successful! |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Coverage report❌ Getting code coverage data failed.
Test suite run success961 tests passing in 133 suites. Report generated by 🧪jest coverage report action from 38afdf5 |
9aab136
to
ac90a73
Compare
Coverage report❌ An unexpected error occurred. For more details, check console
Test suite run success961 tests passing in 133 suites. Report generated by 🧪jest coverage report action from 585a689 |
Coverage report
Test suite run success961 tests passing in 133 suites. Report generated by 🧪jest coverage report action from 008127d |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Annotations and coverage report | ||
uses: ArtiomTr/jest-coverage-report-action@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we are not using Coveralls? It seems that we already have some projects on there: https://coveralls.io/github/safe-global
It should be free for open-source projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the point of depending on a 3rd-party service for something available locally.
skip-step: install | ||
package-manager: yarn | ||
test-script: yarn test:ci | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs of the coverage tool suggest to use this together with https://github.com/marocchino/sticky-pull-request-comment
Such that there is only one coverage comment that gets updated on change instead of having a new comment on each run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It keeps a single comment already, those two other comments in this PR are due to a different configuration while I was testing it.
@@ -32,9 +32,6 @@ | |||
"engines": { | |||
"node": ">=16" | |||
}, | |||
"pre-commit": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we discuss this? It feels out of scope of the coverage report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's dicuss it, yes. I'll start a thread on Slack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing that this setup is missing is seeing the diff to the base branch.
Or will this happen once it's merged to dev
?
@schmanu this action runs Jest on both the target branch and the PR branch and is supposed to give you a diff. I'm not sure why it's not reflected in this PR. Maybe it needs to be merged to dev indeed. |
What it solves
I've switched our CI to a different Jest action that has a better coverage report and the same annotations as the previous one.
Also, I've deleted the pre-commit hook because it was really slow.