Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[py] Run type checks in CI and report typing coverage to codecov #9523

Merged
merged 9 commits into from Jul 16, 2021
20 changes: 20 additions & 0 deletions .github/workflows/python.yml
Expand Up @@ -45,6 +45,26 @@ jobs:
env:
TOXENV: docs

tox_mypy:
runs-on: ubuntu-latest
steps:
- name: Checkout source tree
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox==2.4.1
- name: Test with tox
run: |
tox -c py/tox.ini -- --cobertura-xml-report ci || true
bash <(curl -s https://codecov.io/bash) -f py/ci/cobertura.xml
env:
TOXENV: mypy

unit_tests:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 4 additions & 2 deletions py/tox.ini
Expand Up @@ -15,5 +15,7 @@ commands = flake8 {posargs}

[testenv:mypy]
skip_install = true
deps = mypy
commands = mypy
deps =
mypy
lxml
commands = mypy {posargs}