Skip to content

Commit 16af6f3

Browse files
committed
ci: Ensure collect unknown errors
Use trap ERR to catch any exit error and set the step as fail. Signed-off-by: Jorge Marques <[email protected]>
1 parent bb1c170 commit 16af6f3

File tree

2 files changed

+82
-127
lines changed

2 files changed

+82
-127
lines changed

.github/workflows/checks.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,14 @@ jobs:
4949
- name: Check patch
5050
if: ${{ !cancelled() && env.fatal != 'true' }}
5151
run: |
52-
source ci/build.sh
53-
export -f check_checkpatch set_step_fail set_step_warn
54-
status=0; timeout 1d bash -c "check_checkpatch" || status=$?
52+
status=0; timeout 1d bash -c "source ci/build.sh ; check_checkpatch" || status=$?
5553
[ $status -eq 124 ] && echo "step_fail_checkpatch_timeout=true" >> "$GITHUB_ENV"
5654
exit $status
5755
5856
- name: Coccicheck
5957
if: ${{ !cancelled() && env.fatal != 'true' }}
6058
run: |
61-
source ci/build.sh
62-
export -f check_coccicheck set_step_fail set_step_warn
63-
status=0; timeout 1d bash -c "check_coccicheck" || status=$?
59+
status=0; timeout 1d bash -c "source ci/build.sh ; check_coccicheck" || status=$?
6460
[ $status -eq 124 ] && echo "step_fail_coccicheck_timeout=true" >> "$GITHUB_ENV"
6561
exit $status
6662

0 commit comments

Comments
 (0)