Skip to content

๐Ÿ”’๏ธ fix zizmor --pedantic audits in update_dprint.yml #3453

๐Ÿ”’๏ธ fix zizmor --pedantic audits in update_dprint.yml

๐Ÿ”’๏ธ fix zizmor --pedantic audits in update_dprint.yml #3453

Workflow file for this run

name: CI
permissions:
contents: read
on:
pull_request:
push:
branches: [master]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
UV_LOCKED: 1
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
python-version: "3.14"
activate-environment: true
# the `scientific-python/repo-review` action (v1.0.3) internally uses an unpinned
# `actions/setup-python@v6`, so we use `uvx` instead.
- name: repo-review
run: >
uvx --from='repo-review[cli]' --with=sp-repo-review
repo-review --format html --stderr rich .
>> $GITHUB_STEP_SUMMARY
- name: dprint
uses: dprint/check@9cb3a2b17a8e606d37aae341e49df3654933fc23 # v2.3
- name: typos
uses: crate-ci/typos@02ea592e44b3a53c302f697cddca7641cd051c3d # v1.45.0
- name: ruff check
run: uv run ruff check --output-format=github
- name: ruff format
run: uv run ruff format --check
# mypy_primer expects pyright to pass
- name: pyright
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3.0.2
validate_stubs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: setup uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
python-version: "3.14"
- name: check version literals
run: uv run scripts/check_version_literals.py
- name: check for unstubbed modules
run: uv run scripts/unstubbed_modules.py
# avoid stubdefaulter checking the tests as if they were stubs
- name: exclude tests
run: rm -rf tests
- name: run stubdefaulter
run: uv run stubdefaulter --check --exit-zero --packages .
typecheck:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
py: ["3.11"]
np: ["1.26", "2.0", "2.1", "2.2", "2.3", "2.4"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# NOTE: mypy ignores `uv run --with=...` (and `--isolated` does not help), so we
# manually (re)install the desired version directly in the environment.
- name: setup uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
activate-environment: true
python-version: ${{ matrix.py }}
- name: install dependencies
run: uv pip install --exact --group type numpy==${{ matrix.np }}.* .
- name: ty check scipy-stubs
run: ty check --error-on-warning --output-format=github scipy-stubs
- name: pyrefly check scipy-stubs
run: pyrefly check scipy-stubs
- name: basedpyright scipy-stubs
run: basedpyright scipy-stubs
- name: mypy scipy-stubs
run: mypy --no-incremental --cache-dir=/dev/null scipy-stubs
- name: stubtest scipy
run: stubtest --ignore-disjoint-bases --allowlist=.mypyignore scipy
typetest:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
py: ["3.11", "3.12", "3.13", "3.14"]
np: ["1.26", "2.0", "2.1", "2.2", "2.3", "2.4"]
exclude:
- py: "3.13"
np: "1.26"
- py: "3.13"
np: "2.0"
- py: "3.14"
np: "1.26"
- py: "3.14"
np: "2.0"
- py: "3.14"
np: "2.1"
- py: "3.14"
np: "2.2"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
activate-environment: true
python-version: ${{ matrix.py }}
- name: install dependencies
run: uv pip install --exact --group type numpy==${{ matrix.np }}.* .
- name: pyrefly check tests
run: pyrefly check tests
- name: basedpyright tests
run: basedpyright tests
- name: mypy tests
run: mypy --no-incremental --cache-dir=/dev/null tests