forked from AFPy/potodo
Harden ci (#109)
* Separate coverage to avoid INTERNALERROR> coverage.misc.CoverageException: Couldn't use data file * Freez requirements to avoid surprises in the CI. * Drop this fucker. * Newline at end of file. * Update tox.ini Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com> Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>
This commit is contained in:
parent
eed6d80aad
commit
3d7fab29cd
|
@ -0,0 +1,7 @@
|
|||
pytest
|
||||
coverage
|
||||
polib
|
||||
tox
|
||||
flake8
|
||||
mypy
|
||||
black
|
|
@ -1,9 +1,87 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile requirements-dev.in
|
||||
#
|
||||
appdirs==1.4.4
|
||||
# via
|
||||
# black
|
||||
# virtualenv
|
||||
attrs==20.3.0
|
||||
# via pytest
|
||||
black==20.8b1
|
||||
# via -r requirements-dev.in
|
||||
click==7.1.2
|
||||
# via black
|
||||
coverage==5.3.1
|
||||
# via pytest-cov
|
||||
distlib==0.3.1
|
||||
# via virtualenv
|
||||
filelock==3.0.12
|
||||
# via
|
||||
# tox
|
||||
# virtualenv
|
||||
flake8==3.8.4
|
||||
# via -r requirements-dev.in
|
||||
iniconfig==1.1.1
|
||||
# via pytest
|
||||
mccabe==0.6.1
|
||||
# via flake8
|
||||
mypy-extensions==0.4.3
|
||||
# via
|
||||
# black
|
||||
# mypy
|
||||
mypy==0.790
|
||||
# via -r requirements-dev.in
|
||||
packaging==20.8
|
||||
# via
|
||||
# pytest
|
||||
# tox
|
||||
pathspec==0.8.1
|
||||
# via black
|
||||
pluggy==0.13.1
|
||||
# via
|
||||
# pytest
|
||||
# tox
|
||||
polib==1.1.0
|
||||
requests==2.25.0
|
||||
simple-term-menu==0.10.4
|
||||
gitignore_parser==0.0.8
|
||||
tox
|
||||
virtualenv
|
||||
flake8
|
||||
mypy
|
||||
black
|
||||
# via -r requirements-dev.in
|
||||
py==1.10.0
|
||||
# via
|
||||
# pytest
|
||||
# tox
|
||||
pycodestyle==2.6.0
|
||||
# via flake8
|
||||
pyflakes==2.2.0
|
||||
# via flake8
|
||||
pyparsing==2.4.7
|
||||
# via packaging
|
||||
pytest-cov==2.10.1
|
||||
# via -r requirements-dev.in
|
||||
pytest==6.2.1
|
||||
# via
|
||||
# -r requirements-dev.in
|
||||
# pytest-cov
|
||||
regex==2020.11.13
|
||||
# via black
|
||||
six==1.15.0
|
||||
# via
|
||||
# tox
|
||||
# virtualenv
|
||||
toml==0.10.2
|
||||
# via
|
||||
# black
|
||||
# pytest
|
||||
# tox
|
||||
tox==3.20.1
|
||||
# via -r requirements-dev.in
|
||||
typed-ast==1.4.2
|
||||
# via
|
||||
# black
|
||||
# mypy
|
||||
typing-extensions==3.7.4.3
|
||||
# via
|
||||
# black
|
||||
# mypy
|
||||
virtualenv==20.2.2
|
||||
# via tox
|
||||
|
|
35
tox.ini
35
tox.ini
|
@ -1,26 +1,43 @@
|
|||
[flake8]
|
||||
extend-ignore = E501 # line length handled by black.
|
||||
|
||||
[coverage:run]
|
||||
branch = true
|
||||
parallel = true
|
||||
omit =
|
||||
.tox/*
|
||||
|
||||
[coverage:report]
|
||||
skip_covered = True
|
||||
show_missing = True
|
||||
|
||||
[tox]
|
||||
envlist = py36, py37, py38, py39, flake8, mypy, black
|
||||
envlist = py36, py37, py38, py39, flake8, mypy, black, coverage
|
||||
skip_missing_interpreters = True
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
pytest
|
||||
pytest-cov
|
||||
deps = -r requirements-dev.txt
|
||||
commands = coverage run -m pytest
|
||||
setenv =
|
||||
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
|
||||
|
||||
[testenv:coverage]
|
||||
depends = py36, py37, py38, py39
|
||||
parallel_show_output = True
|
||||
skip_install = True
|
||||
setenv = COVERAGE_FILE={toxworkdir}/.coverage
|
||||
commands =
|
||||
pip install -e .
|
||||
pytest --cov=potodo tests/
|
||||
coverage combine
|
||||
coverage report --fail-under 60
|
||||
|
||||
[testenv:flake8]
|
||||
deps = flake8
|
||||
skip_install = True
|
||||
commands = flake8 tests/ potodo/
|
||||
|
||||
[testenv:black]
|
||||
deps = black
|
||||
skip_install = True
|
||||
commands = black --check --diff tests/ potodo/
|
||||
|
||||
[testenv:mypy]
|
||||
deps = mypy
|
||||
skip_install = True
|
||||
commands = mypy --ignore-missing-imports --strict potodo/
|
||||
|
|
Loading…
Reference in New Issue