-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtox.ini
More file actions
61 lines (56 loc) · 1.44 KB
/
tox.ini
File metadata and controls
61 lines (56 loc) · 1.44 KB
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
[tox]
minversion = 4.11.4
envlist = backend, frontend, lint
isolated_build = True
skipsdist = True
verbosity = 3
[testenv]
passenv = *
deps =
-r{toxinidir}/requirements.txt
commands =
# Run setup first
python -c "print('Running in environment: {envname}')"
# We'll use specialized environments for tests
[testenv:backend]
description = Run backend tests
changedir = {toxinidir}/backend
setenv =
PYTHONPATH = {toxinidir}
ENVIRONMENT = test
APP_ENV = test
deps =
-r{toxinidir}/requirements.txt
pytest>=8.0.0
pytest-cov==4.1.0
coverage==7.3.2
commands =
python -m pytest tests -v --cov=app --cov-report=term-missing --no-cov-on-fail
[testenv:frontend]
description = Run frontend tests
changedir = {toxinidir}/frontend
setenv =
PYTHONPATH = {toxinidir}
ENVIRONMENT = test
APP_ENV = test
deps =
-r{toxinidir}/requirements.txt
pytest>=8.0.0
pytest-cov==4.1.0
coverage==7.3.2
commands =
python -m pytest tests -v --cov=app --cov-report=term-missing --no-cov-on-fail
[testenv:lint]
description = Run linting checks with ruff
deps =
ruff==0.5.0
commands =
ruff check {toxinidir}/backend {toxinidir}/frontend
ruff format --check {toxinidir}/backend {toxinidir}/frontend
[testenv:format]
description = Format code with ruff
deps =
ruff==0.5.0
commands =
ruff format {toxinidir}/backend {toxinidir}/frontend
ruff check --fix {toxinidir}/backend {toxinidir}/frontend