Skip to main content

Mac Example

[tox]
envlist = default
isolated_build = True

[testenv]
deps =
-rrequirements.txt
-rtest-requirements.txt
install_command = pip install {opts} {packages}
whitelist_externals =
sh
commands =
sh -c "cat .env.example > .env"
sh -c "pre-commit install -f --hook-type pre-commit"
sh -c "pre-commit install --hook-type commit-msg"
sh -c "cat ./.hooks/pre-commit > .git/hooks/pre-commit"
sh -c "cat ./.hooks/commit-msg > .git/hooks/commit-msg"

[testenv:run]
skip_install = true
commands =
uvicorn src.map:app --reload --header server:app-api --port 8080

[testenv:test]
skip_install = true
whitelist_externals =
sh
commands =
sh -c "pylint app --exit-zero"
sh -c "pytest"
sh -c "coverage report"

[testenv:test-all]
skip_install = true
whitelist_externals =
sh
commands =
sh -c "pylint app --exit-zero"
sh -c "pytest"
sh -c "./postman/run-api-tests.sh $0 $1 $2" {posargs}
sh -c "coverage report"