-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor how coverage data is created.
Remove github actions which commit a badge to the repo and move all coverage bits internal to the repo
- Loading branch information
Showing
8 changed files
with
5,894 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Check if the file exists | ||
if [ ! -f "$1" ]; then | ||
echo "File not found!" | ||
exit 1 | ||
fi | ||
|
||
# Read the last two lines of the file and extract the last columns | ||
last_col_last_line=$(tail -n 1 "$1" | awk -F',' '{print $NF}') | ||
last_col_second_last_line=$(tail -n 2 "$1" | head -n 1 | awk -F',' '{print $NF}') | ||
|
||
# Compare the last columns | ||
if [ "$last_col_last_line" = "$last_col_second_last_line" ]; then | ||
exit 0 | ||
else | ||
echo "coverage has changed." | ||
echo "generate a new report and badge using: make coverage" | ||
echo "and then check-in the new report and badge?" | ||
echo "coverage before: $last_col_second_last_line" | ||
echo "coverage now: $last_col_last_line" | ||
exit 1 | ||
fi |
Oops, something went wrong.