diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml new file mode 100644 index 0000000..fdb2f9f --- /dev/null +++ b/.github/workflows/mypy.yml @@ -0,0 +1,25 @@ + +name: Run Lint + +on: + workflow_call: + +jobs: + static-type-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v3 + with: + python-version: '3.10' + - run: pip install mypy==1.10.0 + - name: Get Python changed files + id: changed-py-files + uses: tj-actions/changed-files@v44.3.0 + with: + files: | + *.py + **/*.py + - name: Run if any of the listed files above is changed + if: steps.changed-py-files.outputs.any_changed == 'true' + run: mypy ${{ steps.changed-py-files.outputs.all_changed_files }} --ignore-missing-imports