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

Improve coverage badge to be fully automatic #42

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Conversation

astariul
Copy link
Collaborator

🧐 Context

The existing coverage badge is annoying to deal with : we 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 : the github action simply check if the current badge 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.

✅ How this was tested ?

Tested on a dummy repo.

🌱 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 requested a review from QADavidCalvo June 18, 2024 06:03
@astariul astariul self-assigned this Jun 18, 2024
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
kebbie
   cmd.py651675%179–207
   emulator.py44830831%323–325, 327, 352–353, 355–356, 358–359, 361–362, 364–365, 367–368, 370–371, 373–374, 381, 387–401, 428–440, 478–496, 509–513, 522–578, 591–594, 605–617, 625–627, 638–658, 666, 678–682, 691–716, 728–735, 757–787, 803, 823–842, 854–861, 880–896, 905, 918–935, 944, 958–976, 985, 999–1013, 1022, 1036–1047, 1056, 1069–1081, 1090, 1103–1133, 1142, 1155–1168, 1181–1191, 1204–1218
TOTAL132532476% 

Tests Skipped Failures Errors Time
341 0 💤 0 ❌ 0 🔥 2.234s ⏱️

@QADavidCalvo
Copy link
Contributor

Great! Thanks!

@astariul astariul merged commit 51ed220 into main Jun 18, 2024
2 checks passed
@astariul astariul deleted the auto_coverage branch June 18, 2024 06:07
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.

2 participants