Skip to content

Commit 36abdda

Browse files
Fail CI when points are not full score
1 parent d25160b commit 36abdda

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ jobs:
4545
- name: end
4646
id: end
4747
run: grep -a "Test passed" output.txt | grep -oP "\d{1,}/\d{1,}" | xargs -i echo "points={}" | tee $GITHUB_OUTPUT
48+
- name: Require full points
49+
run: |
50+
POINTS='${{ steps.end.outputs.points }}'
51+
if [ -z "$POINTS" ]; then
52+
echo "points is empty"
53+
exit 1
54+
fi
55+
GOT="${POINTS%%/*}"
56+
TOTAL="${POINTS##*/}"
57+
if [ "$GOT" != "$TOTAL" ]; then
58+
echo "points is not full score: $POINTS"
59+
exit 1
60+
fi
61+
echo "points is full score: $POINTS"
4862
deploy:
4963
if: github.repository != 'LearningOS/rCore-Tutorial-Code'
5064
name: Deploy to pages

0 commit comments

Comments
 (0)