Check codebase using mypy in github actions
This commit is contained in:
parent
f29c1d5a30
commit
977fe133d0
18
.github/workflows/dist.yml
vendored
18
.github/workflows/dist.yml
vendored
@ -16,6 +16,22 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: psf/black@stable
|
- 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:
|
check-doc:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
@ -77,7 +93,7 @@ jobs:
|
|||||||
|
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
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')
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
0
cxxheaderparser/py.typed
Normal file
0
cxxheaderparser/py.typed
Normal file
5
mypy.ini
Normal file
5
mypy.ini
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[mypy]
|
||||||
|
exclude = setup\.py|docs
|
||||||
|
|
||||||
|
[mypy-cxxheaderparser._ply.*]
|
||||||
|
ignore_errors = True
|
1
setup.py
1
setup.py
@ -71,6 +71,7 @@ setup(
|
|||||||
license="BSD",
|
license="BSD",
|
||||||
platforms="Platform Independent",
|
platforms="Platform Independent",
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
|
package_data={"cxxheaderparser": ["py.typed"]},
|
||||||
keywords="c++ header parser ply",
|
keywords="c++ header parser ply",
|
||||||
python_requires=">= 3.6",
|
python_requires=">= 3.6",
|
||||||
classifiers=CLASSIFIERS,
|
classifiers=CLASSIFIERS,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user