tox-dev / tox

Command line driven CI frontend and development task automation tool.
https://tox.wiki
MIT License
3.67k stars 521 forks source link

Question: how to not short circuit a command list on failure? Or "finally"? #1321

Closed tommyjcarpenter closed 5 years ago

tommyjcarpenter commented 5 years ago

My tox looks like this (it uses a python webtesting framework called tavern)

[tox]
envlist = tavern

[testenv:tavern]
whitelist_externals=
    sleep
    docker-compose
deps =
    pytest-xdist
    tavern
changedir=integration_tests
commands=
    docker-compose up --build -d
    sleep 5
    pytest -n 2 .     *****
    docker-compose down

If the line marked ***** fails, the command after it is not executed; this command list "short circuits" and the docker-compose down line is never called.

How do I avoid this behavior? Is there a flag that says "keep going, even on a failure"?

gaborbernat commented 5 years ago

https://tox.readthedocs.io/en/latest/config.html#conf-commands_post

tox configuration specification — tox 3.12.2.dev1 documentation
tommyjcarpenter commented 5 years ago

thanks @gaborbernat !!