-
Notifications
You must be signed in to change notification settings - Fork 40
/
tox.ini
46 lines (39 loc) · 983 Bytes
/
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
[tox]
env_list =
pre-commit
tests-no-api-calls
[coverage:paths]
source =
src/
ignore_errors = True
skip_empty = True
[testenv]
description = base evironment
passenv =
AIWORKER_CACHE_HOME
[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:tests]
description = install pytest in a virtual environment and invoke it on the tests folder
skip_install = false
deps =
pytest>=7
pytest-sugar
pytest-cov
requests
-r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121
commands =
pytest tests {posargs} --cov
[testenv:tests-no-api-calls] # TODO: make this a no-cuda environment for github actions
description = same as 'tests', but does not reach out to the APIs
skip_install = false
deps =
pytest>=7
pytest-sugar
pytest-cov
requests
-r requirements.txt
commands =
pytest tests {posargs} --ignore-glob=*api_calls.py --cov