Skip to content

Commit

Permalink
tox: add mypy-diff testenv
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Jan 17, 2020
1 parent 19f66cb commit 03dc3c0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,19 @@ jobs:
run: |
sudo apt-get install pandoc
tox -e publish-gh-release-notes
mypy-diff:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools tox
- name: tox -e mypy-diff
run: "tox -e mypy-diff"
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ commands = pre-commit run --all-files --show-diff-on-failure {posargs:}
extras = checkqa-mypy, testing
commands = mypy {posargs:src testing}

[testenv:mypy-diff]
extras = checkqa-mypy, testing
deps =
lxml
diff-cover
commands =
-mypy --cobertura-xml-report {envtmpdir} {posargs:src testing}
diff-cover --fail-under=100 --compare-branch={env:DIFF_BRANCH:origin/{env:GITHUB_BASE_REF:master}} {envtmpdir}/cobertura.xml

[testenv:docs]
basepython = python3
usedevelop = True
Expand Down

0 comments on commit 03dc3c0

Please sign in to comment.