Skip to content

Commit

Permalink
[CI/Build] Make mypy job fail when errors occur
Browse files Browse the repository at this point in the history
Fix `tools/mypy.sh` to fail when any command fails when running in CI.

Signed-off-by: Russell Bryant <[email protected]>
  • Loading branch information
russellb committed Oct 18, 2024
1 parent 32318c7 commit bf37729
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
- name: Mypy
run: |
echo "::add-matcher::.github/workflows/matchers/mypy.json"
tools/mypy.sh
tools/mypy.sh 1
4 changes: 4 additions & 0 deletions tools/mypy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

CI=${1:-0}

if [ $CI -eq 1 ]; then
set -e
fi

run_mypy() {
echo "Running mypy on $1"
if [ $CI -eq 1 ] && [ -z "$1" ]; then
Expand Down

0 comments on commit bf37729

Please sign in to comment.