Skip to content

Commit 26878a2

Browse files
Fail CI when points are not full score
1 parent 1148a2d commit 26878a2

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,17 @@ jobs:
3030
run: |
3131
cat output.txt | grep "Test passed" | grep -oP "\d{1,}/\d{1,}" | xargs -i echo "points={}"
3232
cat output.txt | grep "Test passed" | grep -oP "\d{1,}/\d{1,}" | xargs -i echo "points={}" >> $GITHUB_OUTPUT
33+
- name: Require full points
34+
run: |
35+
POINTS='${{ steps.end.outputs.points }}'
36+
if [ -z "$POINTS" ]; then
37+
echo "points is empty"
38+
exit 1
39+
fi
40+
GOT="${POINTS%%/*}"
41+
TOTAL="${POINTS##*/}"
42+
if [ "$GOT" != "$TOTAL" ]; then
43+
echo "points is not full score: $POINTS"
44+
exit 1
45+
fi
46+
echo "points is full score: $POINTS"

0 commit comments

Comments
 (0)