diff --git a/.github/workflows/push-checks.yml b/.github/workflows/push-checks.yml index e0c98897..07f45e75 100644 --- a/.github/workflows/push-checks.yml +++ b/.github/workflows/push-checks.yml @@ -9,10 +9,15 @@ name: Push-Checks on: push: - branches: [ develop ] + # We'll catch issues on `develop` or any PR branch. + branches-ignore: + - 'main' + - 'stable' + - 'releases' + - 'beta' jobs: - build: + push_checks: runs-on: ubuntu-22.04 @@ -59,3 +64,7 @@ jobs: grep -E -z -Z '\.py$' | \ xargs -0 flake8 --count --statistics --extend-ignore D ####################################################################### + + - name: mypy type checks + run: | + ./scripts/mypy-all.sh --platform win32 diff --git a/scripts/mypy-all.sh b/scripts/mypy-all.sh new file mode 100755 index 00000000..72a37f0b --- /dev/null +++ b/scripts/mypy-all.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# +# Run mypy checks against all the relevant files + +# We assume that all `.py` files in git should be checked, and *only* those. +mypy $@ $(git ls-tree --full-tree -r --name-only HEAD | grep -E '\.py$')