Skip to content

Commit

Permalink
Merge pull request #22 from codecov/may_06_mypy
Browse files Browse the repository at this point in the history
Add a mypy workflow to check changed files only
  • Loading branch information
JerrySentry authored May 7, 2024
2 parents 0c5c72d + 97fdc1f commit cfb98a8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Patch typing check

on:
workflow_call:

jobs:
static-type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: '3.12'
- run: pip install mypy==1.10.0
- name: Get Python changed files
id: changed-py-files
uses: tj-actions/[email protected]
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

0 comments on commit cfb98a8

Please sign in to comment.