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

Truly auto coverage badge #105

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Truly auto coverage badge #105

merged 2 commits into from
Jun 18, 2024

Conversation

astariul
Copy link
Owner

🧐 Context

The existing coverage badge is annoying to deal with : people often forget to run the command to update the coverage badge before pushing, leading to failing tests on the PR, despite the tests passing locally.

This is because the coverage badge is not truly automatic : we simply check it is up-to-date.

🔍️ Description

This PR moves the coverage badge to an external github Gist.

The github actions changes as well :

  • On PR, after running the tests, we upload a message in the PR with the coverage results.
  • Whenever something is pushed to the main branch, we run the tests and upload the freshly created coverage badge to the external github gist, effectively keeping the coverage badge automatically up-to-date.

⚠️ Side-effects / Shortcomings

Need to rely on an external Gist.

✅ How this was tested ?

Tested by creating a new repo and ensuring everything works well.

🌱 Checklist

  • Perform self-review of my own code
  • Comment the code, particularly in hard-to-understand areas
  • Update the documentation accordingly to the new code
  • Lint / format the code
  • Update existing tests / Add new tests
  • Tests are passing locally

@astariul astariul self-assigned this Jun 18, 2024
Copy link

Coverage

Coverage Report
FileStmtsMissCover
TOTAL20100%

Tests Skipped Failures Errors Time
10 0 💤 0 ❌ 0 🔥 0.085s ⏱️

@astariul astariul merged commit 51214ef into main Jun 18, 2024
2 checks passed
@astariul astariul deleted the auto_coverage branch June 18, 2024 05:16
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.

1 participant