Skip to content

Commit 8981fc6

Browse files
committed
CI: Verify public API types with pyright
1 parent 77927fa commit 8981fc6

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/tests.yml

+26
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,29 @@ jobs:
4343
uses: codecov/codecov-action@v3
4444
with:
4545
token: ${{ secrets.CODECOV_TOKEN }}
46+
47+
typesafety:
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- uses: actions/checkout@v3
52+
- uses: actions/setup-python@v4
53+
with:
54+
python-version: '3.12'
55+
cache: 'pip'
56+
57+
- run: |
58+
python -m venv .venv
59+
source .venv/bin/activate
60+
pip install --upgrade pip
61+
# Tell setuptools to *not* create a PEP 660 import hook and to use
62+
# symlinks instead, so that pyright can still find the package. See
63+
# https://microsoft.github.io/pyright/#/import-resolution?id=editable-installs
64+
pip install --editable . --config-settings editable_mode=strict
65+
66+
- run: echo "$PWD/.venv/bin" >> $GITHUB_PATH
67+
68+
- uses: jakebailey/pyright-action@v1
69+
with:
70+
ignore-external: true
71+
verify-types: "aocd"

0 commit comments

Comments
 (0)