Replaces static "build passing" badge with the "Unit Test" CI status one
Added a push trigger to the "Unit Test" CI, so the badge can reference the status of the branch instead of the last PR
How I Tested
Open the repository README.md
The README should show the "Unit Tests | passing" badge
Clicking on the badge
Should show the CI runs history
Notes
To avoid making the badge reference the last CI run (that could be from a PR), I had to add a trigger for pushes in the dev and main branches and add the event=push parameter to the badge to make sure it shows the status of the build for the current state of that branch (see the documentation).
I used the actions badge as instructed, but the style does not match the existing ones. Shields.io provides a badge for workflow status that should work the same way:
GitHub:
Shields.io
Ps: There is no status because there are no CI runs for pushs yet.
What it Does
How I Tested
Notes
To avoid making the badge reference the last CI run (that could be from a PR), I had to add a trigger for pushes in the
dev
andmain
branches and add theevent=push
parameter to the badge to make sure it shows the status of the build for the current state of that branch (see the documentation).I used the actions badge as instructed, but the style does not match the existing ones. Shields.io provides a badge for workflow status that should work the same way:
GitHub:![Unit Tests](https://github.com/mikaelacaron/Basic-Car-Maintenance/actions/workflows/unit-tests.yml/badge.svg?event=push)
Shields.io![Unit Tests](https://img.shields.io/github/actions/workflow/status/mikaelacaron/Basic-Car-Maintenance/unit-tests.yml?event=push&logo=github&label=Unit%20Tests)
Ps: There is no status because there are no CI runs for
push
s yet.Screenshot