Check codebase using mypy in github actions

This commit is contained in:
Dustin Spicuzza 2022-01-02 21:53:22 -05:00
parent f29c1d5a30
commit 977fe133d0
4 changed files with 23 additions and 1 deletions

View File

@ -16,6 +16,22 @@ jobs:
- uses: actions/checkout@v2
- uses: psf/black@stable
check-mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# - uses: jpetrucciani/mypy-check@0.930
# .. can't use that because we need to install pytest
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install requirements
run: |
pip --disable-pip-version-check install mypy pytest
- name: Run mypy
run: |
mypy .
check-doc:
runs-on: ubuntu-18.04
@ -77,7 +93,7 @@ jobs:
publish:
runs-on: ubuntu-latest
needs: [check, check-doc, test]
needs: [check, check-mypy, check-doc, test]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
steps:

0
cxxheaderparser/py.typed Normal file
View File

5
mypy.ini Normal file
View File

@ -0,0 +1,5 @@
[mypy]
exclude = setup\.py|docs
[mypy-cxxheaderparser._ply.*]
ignore_errors = True

View File

@ -71,6 +71,7 @@ setup(
license="BSD",
platforms="Platform Independent",
packages=find_packages(),
package_data={"cxxheaderparser": ["py.typed"]},
keywords="c++ header parser ply",
python_requires=">= 3.6",
classifiers=CLASSIFIERS,