Skip to content

Commit

Permalink
github: add mypy workflow
Browse files Browse the repository at this point in the history
This will run mypy only on changed files
  • Loading branch information
FrostyX committed Aug 4, 2024
1 parent 6211b14 commit 78f26fa
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "mypy check"
on: [pull_request]

jobs:

static-type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: '3.x'
- run: pip install mypy
- name: Get Python changed files
id: changed-py-files
uses: tj-actions/changed-files@v23
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 }}

0 comments on commit 78f26fa

Please sign in to comment.