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

Add Codecov #202

Merged
merged 7 commits into from
Dec 5, 2024
Merged

Add Codecov #202

merged 7 commits into from
Dec 5, 2024

Conversation

kvz
Copy link
Member

@kvz kvz commented Nov 27, 2024

No description provided.

@codecov-commenter
Copy link

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 ☂️

@kvz kvz changed the title Add comprehensive coverage reporting and thresholds Add Codecov Nov 27, 2024
@kvz kvz self-assigned this Nov 27, 2024
@kvz kvz requested review from remcohaszing and mifi November 27, 2024 11:52
@kvz kvz marked this pull request as ready for review November 27, 2024 12:07
with:
name: coverage-reports
path: coverage/
- name: Upload coverage to Codecov
Copy link
Member

Choose a reason for hiding this comment

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

Personally I’m not a fan of using the name property too much. It acts as a label, which defaults to the action name. IMO codecov/codecov-action@v4 is more descriptive than a custom label.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree that name is not needed when the uses is descriptive, however in this case I don't think codecov/codecov-action@v4 is more descriptive than Upload coverage to Codecov. it's not obvious that codecov/codecov-action@v4 does just an upload.

with:
name: coverage-reports
path: coverage
- name: Check coverage thresholds
Copy link
Member

Choose a reason for hiding this comment

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

In case of a multi-line shell script I do think the name is useful.

if [ ! -f coverage/coverage-summary.json ]; then
echo "No coverage report found"
exit 1
fi
Copy link
Member

Choose a reason for hiding this comment

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

This doesn’t actually check the thresholds. Also doesn’t Vitest already fail if the threshold isn’t met?

with:
name: coverage-reports
path: coverage/
- name: Upload coverage to Codecov
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree that name is not needed when the uses is descriptive, however in this case I don't think codecov/codecov-action@v4 is more descriptive than Upload coverage to Codecov. it's not obvious that codecov/codecov-action@v4 does just an upload.

name: coverage-reports
path: coverage/
- name: Upload coverage to Codecov
if: matrix.node == 22 # Only upload coverage from the latest Node.js version
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we can move this into the coverage job, then we don't have to check for node version again also

kvz and others added 3 commits December 2, 2024 15:42
@kvz kvz requested review from mifi and remcohaszing December 2, 2024 16:00
@kvz kvz merged commit 7caf090 into main Dec 5, 2024
9 checks passed
@kvz kvz deleted the coverage branch December 5, 2024 12:08
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.

4 participants