diff --git a/.github/workflows/test-quick.yaml b/.github/workflows/test-quick.yaml index c0d541f..f001c2b 100644 --- a/.github/workflows/test-quick.yaml +++ b/.github/workflows/test-quick.yaml @@ -21,8 +21,8 @@ jobs: os: - ubuntu python: - - "3.9" - - "3.14" + - '3.9' + - '3.14' backend: - base @@ -37,8 +37,9 @@ jobs: - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 from 2026-01-21. with: - python-version: ${{ matrix.python }} allow-prereleases: true + cache: 'pip' + python-version: ${{ matrix.python }} - name: Install tox run: python -m pip install tox @@ -69,7 +70,8 @@ jobs: - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 from 2026-01-21. with: - python-version: "3.13" + cache: 'pip' + python-version: '3.13' - name: Install tox run: python -m pip install tox @@ -79,3 +81,34 @@ jobs: - uses: ironsh/iron-proxy-action/summary@67ae2cdb5cc549c5cb94e76235953f4a9fcb183c # v0.1.3 from 2026-04-07. if: always() + + pyright: + name: Pyright + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 from 2026-01-09. + + - uses: ironsh/iron-proxy-action@67ae2cdb5cc549c5cb94e76235953f4a9fcb183c # v0.1.3 from 2026-04-07. + with: + egress-rules: .github/egress-build-rules.yaml + warn: 'true' + + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 from 2026-01-21. + with: + cache: 'pip' + python-version: '3.14' + + - run: | + python -m venv .venv + source .venv/bin/activate + pip install '.[hyperscan,optional,re2]' + + - run: echo "$PWD/.venv/bin" >> $GITHUB_PATH + + - uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3.0.2 from 2026-02-15. + with: + version: latest + + - uses: ironsh/iron-proxy-action/summary@67ae2cdb5cc549c5cb94e76235953f4a9fcb183c # v0.1.3 from 2026-04-07. + if: always() diff --git a/pyproject.in.toml b/pyproject.in.toml index 9748b40..03f4ffd 100644 --- a/pyproject.in.toml +++ b/pyproject.in.toml @@ -73,3 +73,8 @@ include = [ exclude = [ "doc/build/", ] + +[tool.pyright] +# This is for CI. +include = ["pathspec"] +typeCheckingMode = "standard" diff --git a/pyproject.toml b/pyproject.toml index 321c133..f8b29cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,3 +74,8 @@ include = [ exclude = [ "doc/build/", ] + +[tool.pyright] +# This is for CI. +include = ["pathspec"] +typeCheckingMode = "standard"