Skip to content

Commit

Permalink
Merge pull request #115 from pallets-eco/chore/add-typing-ci
Browse files Browse the repository at this point in the history
chore: Add Typing in Ci
  • Loading branch information
Abdur-rahmaanJ authored Dec 16, 2024
2 parents 64ce841 + 283736b commit 5c0d2f7
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,19 @@ jobs:
cache-dependency-path: requirements*/*.txt
- run: pip install tox
- run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }}
typing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.x'
cache: pip
cache-dependency-path: requirements*/*.txt
- name: cache mypy
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ./.mypy_cache
key: mypy|${{ hashFiles('pyproject.toml') }}
- run: pip install tox
- run: tox run -e typing
1 change: 1 addition & 0 deletions requirements/typing.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pyright
pytest
mypy
16 changes: 11 additions & 5 deletions requirements/typing.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile typing.in
# pip-compile --output-file=requirements/typing.txt requirements/typing.in
#
iniconfig==2.0.0
# via pytest
mypy==1.13.0
# via -r requirements/typing.in
mypy-extensions==1.0.0
# via mypy
nodeenv==1.8.0
# via pyright
packaging==24.0
# via pytest
pluggy==1.5.0
# via pytest
pyright==1.1.387
# via -r typing.in
# via -r requirements/typing.in
pytest==8.3.3
# via -r typing.in
# via -r requirements/typing.in
typing-extensions==4.12.2
# via pyright
# via
# mypy
# pyright

# The following packages are considered to be unsafe in a requirements file:
# setuptools
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
envlist =
py3{12,11,10,9,8}
minimal
typing
style
docs
skip_missing_interpreters = true
Expand All @@ -23,6 +24,12 @@ deps = pre-commit
skip_install = true
commands = pre-commit run --all-files

[testenv:typing]
deps = -r requirements/typing.txt
commands =
mypy src
pyright src

[testenv:docs]
deps = -r requirements/docs.txt
commands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml
Expand Down

0 comments on commit 5c0d2f7

Please sign in to comment.