-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
63 lines (62 loc) · 2.27 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
[tox]
envlist = tests
requires =
tox>=3.25.0,<4
tox-envfile
tox-faster
tox-run-command
tox-recreate
isolated_build = true
[testenv]
skip_install =
format,checkformatting,coverage,template: true
setenv =
PYTHONUNBUFFERED = 1
OBJC_DISABLE_INITIALIZE_FORK_SAFETY = YES
dev: DEV = {env:DEV:true}
dev: SENTRY_ENVIRONMENT = {env:SENTRY_ENVIRONMENT:dev}
dev: NEW_RELIC_APP_NAME = {env:NEW_RELIC_APP_NAME:test-pypackage}
dev: NEW_RELIC_ENVIRONMENT = {env:NEW_RELIC_ENVIRONMENT:dev}
tests: COVERAGE_FILE = {env:COVERAGE_FILE:.coverage.{envname}}
dev: ALEMBIC_CONFIG = {env:ALEMBIC_CONFIG:conf/alembic.ini}
dev: DATABASE_URL = {env:DATABASE_URL:postgresql://postgres@localhost:5437/postgres}
tests: DATABASE_URL = {env:UNITTESTS_DATABASE_URL:postgresql://postgres@localhost:5437/test_pypackage_tests}
functests: DATABASE_URL = {env:FUNCTESTS_DATABASE_URL:postgresql://postgres@localhost:5437/test_pypackage_functests}
passenv =
HOME
PYTEST_ADDOPTS
dev: DEBUG
dev: SENTRY_DSN
dev: NEW_RELIC_LICENSE_KEY
deps =
dev: ipython
format,checkformatting,lint: ruff
lint,tests: pytest-mock
lint,tests,functests: pytest
lint,tests,functests: h-testkit
tests: pytest-cov
coverage: coverage[toml]
lint,tests,functests: factory-boy
lint,tests,functests: pytest-factoryboy
lint,tests,functests: h-matchers
lint,template: cookiecutter
typecheck: mypy
depends =
coverage: tests,py{312,311,310,39}-tests
allowlist_externals =
tests,functests: sh
commands =
tests: sh bin/create-db test_pypackage_tests
functests: sh bin/create-db test_pypackage_functests
dev: {posargs:ipython --classic --no-banner --no-confirm-exit}
format: ruff check --select I --fix src tests bin
format: ruff format src tests bin
checkformatting: ruff check --select I src tests bin
checkformatting: ruff format --check src tests bin
lint: {posargs:ruff check src tests bin}
tests: python -m pytest --cov --cov-report= --cov-fail-under=0 {posargs:tests/unit/}
functests: python -m pytest --failed-first --new-first --no-header --quiet {posargs:tests/functional/}
coverage: coverage combine
coverage: coverage report
typecheck: mypy src
template: python3 bin/make_template {posargs}