current libraries seem to have problems on Windows with thinking files are duplicated when they are not, making it impossible to compile .proto files at runtime in this tool on that platform. this adds a fallback of using shipped, precompiled files in the package. I was already intending on providing this as an option anyway, so might as well start doing it now. Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
71 lines
1.6 KiB
INI
71 lines
1.6 KiB
INI
# tox (https://tox.readthedocs.io/) is a tool for running tests
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
# and then run "tox" from this directory.
|
|
|
|
[tox]
|
|
isolated_build = true
|
|
envlist = begin,py39,py310,py311,coverage,bandit,lint
|
|
|
|
[testenv]
|
|
allow_externals = pytest, coverage
|
|
|
|
deps =
|
|
-rrequirements/requirements-dev.txt
|
|
|
|
[testenv:begin]
|
|
# clean up potential previous coverage runs
|
|
skip_install = true
|
|
commands = coverage erase
|
|
|
|
[testenv:py39]
|
|
# run pytest with coverage
|
|
commands =
|
|
pytest --cov-append --cov={envsitepackagesdir}/gp2040ce_bintools/ --cov-branch
|
|
|
|
[testenv:py310]
|
|
# run pytest with coverage
|
|
commands =
|
|
pytest --cov-append --cov={envsitepackagesdir}/gp2040ce_bintools/ --cov-branch
|
|
|
|
[testenv:py311]
|
|
# run pytest with coverage
|
|
commands =
|
|
pytest --cov-append --cov={envsitepackagesdir}/gp2040ce_bintools/ --cov-branch
|
|
|
|
[testenv:coverage]
|
|
# report on coverage runs from above
|
|
skip_install = true
|
|
commands =
|
|
coverage report --fail-under=90 --show-missing
|
|
|
|
[testenv:bandit]
|
|
commands =
|
|
bandit ./gp2040ce_bintools/ -r
|
|
|
|
; dep hell, can't install safety at the moment
|
|
; [testenv:safety]
|
|
; skip_install = true
|
|
; isolated_build = false
|
|
; commands =
|
|
; safety check -r requirements/requirements-dev.txt
|
|
|
|
[testenv:lint]
|
|
# run style checks
|
|
commands =
|
|
flake8
|
|
mypy gp2040ce_bintools
|
|
- flake8 --disable-noqa --ignore= --select=E,W,F,C,D,A,G,B,I,T,M,DUO
|
|
|
|
[coverage:paths]
|
|
source =
|
|
./
|
|
.tox/**/site-packages/
|
|
|
|
[coverage:run]
|
|
branch = True
|
|
|
|
omit =
|
|
**/_version.py
|
|
**/proto_snapshot/*
|