diff --git a/.github/workflows/sanity-check.yml b/.github/workflows/sanity-check.yml index d33bf7a..0fbab59 100644 --- a/.github/workflows/sanity-check.yml +++ b/.github/workflows/sanity-check.yml @@ -50,6 +50,7 @@ jobs: - name: Run model checks if: steps.find_files.outputs.count != '0' run: | + set -e while read -r f; do [ -z "$f" ] && continue echo "Checking model: $f" diff --git a/CI/post_filter.py b/CI/post_filter.py index 837d1f5..13d6cad 100644 --- a/CI/post_filter.py +++ b/CI/post_filter.py @@ -48,6 +48,8 @@ def run_and_filter(cmd:str): except Exception: pass + return proc.returncode + def main(argv=None): p = argparse.ArgumentParser(prog='post_filter', description='Run command and filter its output') p.add_argument('cmd', nargs=argparse.REMAINDER, help='Command to run (use -- before the command)') @@ -63,7 +65,7 @@ def main(argv=None): if cmd and cmd[0] == '--': cmd = cmd[1:] - run_and_filter(cmd) + return run_and_filter(cmd) if __name__ == '__main__': sys.exit(main())