Skip to content

Commit

Permalink
👷 Run mypy from within tox
Browse files Browse the repository at this point in the history
…to resolve dependencies.

Driv-by: Run `system` tests from within `mypy`, as creating an
additional container considered too waistful for now.
  • Loading branch information
MarcelWaldvogel committed Nov 18, 2021
1 parent c6cc7c7 commit 85f25b7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ flake8:
mypy:
stage: lint
script:
- pip3 install mypy importlib_metadata
- cd src && mypy -p dnstemple
- pip3 install tox
- tox -e mypy,system

# unit
unit:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pypi: distribution-package test
test: tests
tests:
flake8
cd src && mypy -p dnstemple
tox
${MAKE} -C sample test

.PHONY: python-package distribution-package pypi tests test
15 changes: 13 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py36, py37, py38, py39, py310, pypy3, system
envlist = mypy, py36, py37, py38, py39, py310, pypy3, system
isolated_build = True

[testenv]
Expand All @@ -28,11 +28,22 @@ deps =
commands =
pytest --cov

[testenv:mypy]
deps =
mypy
importlib_metadata
dnspython
PyYAML
types-PyYAML
allowlist_externals = sh
commands =
sh -c "cd src && mypy -p dnstemple"

[testenv:system]
deps =
importlib_metadata
dnspython
PyYAML
allowlist_externals = make
commands =
make test
make -C sample test

0 comments on commit 85f25b7

Please sign in to comment.