Skip to content

Instantly share code, notes, and snippets.

@BjornvdLaan
Created October 15, 2021 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BjornvdLaan/9d27d8f59f982161de46a62e460e3b0a to your computer and use it in GitHub Desktop.
Save BjornvdLaan/9d27d8f59f982161de46a62e460e3b0a to your computer and use it in GitHub Desktop.
Starter template for tox when using docker-compose to set up dependent systems
[tox]
minversion = 3.24
envlist = py{39}-{mac,wsl}
skipsdist = True
[flake8]
exclude = .git,.tox,dist,doc,*lib/python*,*egg,build
[testenv]
allowlist_externals =
docker
docker-compose
flake8
black
sh
poetry
skip_install = True
usedevelop = True
platform =
wsl: linux
mac: darwin
setenv =
PYTHONPATH=source/
commands_pre =
docker-compose up -d
commands =
poetry install
flake8 -v
poetry run pytest -vv --cov=source test
black -l 79 .
commands_post =
docker-compose down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment