From 18b303d02061ad55490ea3ff42462eb3bd7d219c Mon Sep 17 00:00:00 2001 From: jorenham Date: Thu, 18 Sep 2025 09:26:24 +0200 Subject: [PATCH] CI: Static typing validation workflow for quaddtype --- .github/workflows/typecheck.yml | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/typecheck.yml diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 0000000..c35ae1f --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,48 @@ +name: Validate static types in quaddtype +permissions: read-all + +on: + pull_request: + paths: + - .github/workflows/typecheck.yml + - quaddtype/numpy_quaddtype/* + - quaddtype/meson.build + - quaddtype/pyproject.toml + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + typecheck_quaddtype: + runs-on: ubuntu-latest + timeout-minutes: 2 + + steps: + - uses: actions/checkout@v5.0.0 + + - uses: astral-sh/setup-uv@v6.7.0 + with: + activate-environment: true + python-version: "3.10" + + - name: install + working-directory: quaddtype + run: uv pip install mypy pyright . + + - name: pyright + working-directory: quaddtype + run: pyright + + - name: pyright --verifytypes + working-directory: quaddtype + run: pyright --ignoreexternal --verifytypes numpy_quaddtype + + - name: mypy + working-directory: quaddtype + run: mypy --no-incremental --cache-dir=/dev/null . + + - name: stubtest + working-directory: quaddtype + run: stubtest --mypy-config-file pyproject.toml numpy_quaddtype