From 2a09af1648af430deaee351ba7208655006f2c85 Mon Sep 17 00:00:00 2001 From: JerrySentry Date: Mon, 6 May 2024 17:12:46 -0400 Subject: [PATCH 1/3] add a mypy workflow to check changed files only --- .github/workflows/mypy.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/mypy.yml 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 From 06dd8c8fd4357280ee744b702d536a4107fd9dce Mon Sep 17 00:00:00 2001 From: JerrySentry Date: Mon, 6 May 2024 17:14:58 -0400 Subject: [PATCH 2/3] rename workflow --- .github/workflows/mypy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index fdb2f9f..0086901 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -1,5 +1,5 @@ -name: Run Lint +name: Patch typing check on: workflow_call: From 97fdc1f024ae0a764eeffad82c685fcb7f26957f Mon Sep 17 00:00:00 2001 From: JerrySentry Date: Tue, 7 May 2024 09:56:34 -0400 Subject: [PATCH 3/3] update versions --- .github/workflows/mypy.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 0086901..481056d 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -1,4 +1,3 @@ - name: Patch typing check on: @@ -8,10 +7,10 @@ jobs: static-type-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-python@v3 with: - python-version: '3.10' + python-version: '3.12' - run: pip install mypy==1.10.0 - name: Get Python changed files id: changed-py-files