-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Expand file tree
/
Copy pathtox.ini
More file actions
112 lines (106 loc) · 3.93 KB
/
tox.ini
File metadata and controls
112 lines (106 loc) · 3.93 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[tox]
requires =
tox>=4.22 # `dependency_groups` needed
tox-uv>=1.19
envlist = py{310,311,312,313}-{cdh,hdp,core,contrib,apache,aws,gcloud,mysql,postgres,unixsocket,azureblob,dropbox}, visualiser, docs, lint, typecheck
skipsdist = True
[pytest]
addopts = --cov=luigi --cov-report=xml -vv --strict-markers --ignore-glob="**/_*" --fulltrace
testpaths = test
markers =
contrib: tests related to luigi/contrib
apache: tests related to apache
aws: tests related to AWS
postgres: tests related to postgresql
mysql: tests related to mysql
scheduler: tests related to scheduler
cdh: tests related to cdh
hdp: tests related to hdp
gcloud: tests related to GCP
unixsocket: tests related to unixsocket
dropbox: tests related to dropbox
azureblob: tests related to azure
unmarked: tests with no explicit markers
[testenv]
runner = uv-venv-lock-runner
allowlist_externals = {toxinidir}/scripts/ci/*.sh
dependency_groups =
core: common
contrib: common
apache: common
aws: common
postgres: test_postgres
mysql: common
scheduler: common
cdh: test_cdh
hdp: test_hdp
gcloud: test_gcloud
unixsocket: test_unixsocket
dropbox: test_dropbox
azureblob: common
passenv = USER, JAVA_HOME, POSTGRES_USER, DATAPROC_TEST_PROJECT_ID, GCS_TEST_PROJECT_ID, GCS_TEST_BUCKET, GOOGLE_APPLICATION_CREDENTIALS, CI, DROPBOX_APP_TOKEN, DOCKERHUB_TOKEN, GITHUB_ACTIONS, OVERRIDE_SKIP_CI_TESTS
setenv =
LC_ALL = en_US.utf-8
cdh: HADOOP_DISTRO=cdh
cdh: HADOOP_HOME={toxinidir}/.tox/hadoop-cdh
hdp: HADOOP_DISTRO=hdp
hdp: HADOOP_HOME={toxinidir}/.tox/hadoop-hdp
LUIGI_CONFIG_PATH={toxinidir}/test/testconfig/luigi.cfg
COVERAGE_PROCESS_START={toxinidir}/.coveragerc
FULL_COVERAGE=true
AWS_DEFAULT_REGION=us-east-1
AWS_ACCESS_KEY_ID=accesskey
AWS_SECRET_ACCESS_KEY=secretkey
AZURITE_ACCOUNT_NAME=devstoreaccount1
AZURITE_ACCOUNT_KEY=YXp1cml0ZQ==
AZURITE_CUSTOM_DOMAIN=localhost:10000
commands =
# Setup
cdh,hdp: {toxinidir}/scripts/ci/setup_hadoop_env.sh
azureblob: {toxinidir}/scripts/ci/install_start_azurite.sh {toxinidir}/scripts/ci
{envpython} --version
# Test
contrib: {envpython} test/runtests.py test/contrib/ -m "contrib or unmarked" {posargs:}
apache: {envpython} test/runtests.py -m apache {posargs:}
aws: {envpython} test/runtests.py -m aws {posargs:}
mysql: {envpython} test/runtests.py -m mysql {posargs:}
postgres: {envpython} test/runtests.py -m postgres {posargs:}
scheduler: {envpython} test/runtests.py -m scheduler {posargs:}
cdh,hdp: {envpython} test/runtests.py -m minicluster {posargs:}
gcloud: {envpython} test/runtests.py -m gcloud {posargs:}
unixsocket: {envpython} test/runtests.py -m unixsocket {posargs:}
dropbox: {envpython} test/runtests.py -m dropbox {posargs:}
azureblob: {envpython} test/runtests.py -m azureblob {posargs:}
core: {envpython} test/runtests.py --doctest-modules -m "not minicluster and not gcloud and not mysql and not postgres and not unixsocket and not contrib and not apache and not aws and not azureblob and not dropbox" -n auto --dist=loadfile {posargs:}
# Teardown
azureblob: {toxinidir}/scripts/ci/stop_azurite.sh
[testenv:visualiser]
runner = uv-venv-lock-runner
dependency_groups = visualizer
passenv = {[testenv]passenv}
setenv =
LC_ALL = en_US.utf-8
LUIGI_CONFIG_PATH={toxinidir}/test/testconfig/luigi.cfg
TEST_VISUALISER=1
commands =
python --version
pytest test/visualiser
[testenv:lint]
dependency_groups = lint
commands =
ruff check .
ruff format --check .
[testenv:typecheck]
dependency_groups = common
commands =
mypy luigi/
[testenv:docs]
# Python 3.13 required for Sphinx 9.x
basepython = py313
# Build documentation using sphinx.
# Call this using `tox run -e docs`.
dependency_groups = docs
setenv =
AWS_DEFAULT_REGION=us-east-1
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees doc doc/_build/html