Skip to content

Commit

Permalink
Fail CI if ERROR_LINES is non-zero
Browse files Browse the repository at this point in the history
  • Loading branch information
erszcz committed Mar 15, 2023
1 parent 7612918 commit da2a4fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/self-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: "Assess self check result"
run: |
ERROR_LINES=$(wc -l gradualize.log | awk '{print $1}')
if [ $ERROR_LINES -lt 100 ]; then
echo "ok, self reported errors are in check: $ERROR_LINES < 100"
if [ $ERROR_LINES -eq 0 ]; then
echo "ok, there are no self-check errors: $ERROR_LINES == 0"
exit 0
else
echo "we've regressed, failing the job: $ERROR_LINES >= 100"
echo "we've regressed, failing the job: $ERROR_LINES != 0"
exit 1
fi
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ bin/gradualizer: $(beams) ebin/gradualizer.app

.PHONY: gradualize
gradualize: escript
bin/gradualizer --infer --solve_constraints --specs_override_dir priv/extra_specs/ \
@bin/gradualizer --infer --solve_constraints --specs_override_dir priv/extra_specs/ \
-pa ebin --color ebin | grep -v -f gradualize-ignore.lst

.PHONY: nocrashongradualize
Expand Down

0 comments on commit da2a4fd

Please sign in to comment.