2021-04-26 16:44:36 -07:00
|
|
|
# tox (https://tox.readthedocs.io/) is a tool for running tests
|
|
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
|
|
# and then run "tox" from this directory.
|
|
|
|
|
|
|
|
[tox]
|
2022-02-04 07:32:38 -08:00
|
|
|
envlist = py3-quick,{py36,py39}-full,py3-airflow1
|
2021-07-26 13:25:58 -07:00
|
|
|
|
|
|
|
[gh-actions]
|
|
|
|
python =
|
2022-02-04 07:32:38 -08:00
|
|
|
3.6: py36-full
|
|
|
|
3.9: py39-full
|
2021-04-26 16:44:36 -07:00
|
|
|
|
2021-09-23 15:02:45 -04:00
|
|
|
# Providing optional features that add dependencies from setup.py as deps here
|
|
|
|
# allows tox to recreate testenv when new dependencies are added to setup.py.
|
|
|
|
# Previous approach of using the tox global setting extras is not recommended
|
|
|
|
# as extras is only called when the testenv is created for the first time!
|
|
|
|
# see more here -> https://github.com/tox-dev/tox/issues/1105#issuecomment-448596282
|
|
|
|
|
2021-04-26 16:44:36 -07:00
|
|
|
[testenv]
|
2021-09-23 15:02:45 -04:00
|
|
|
deps =
|
2022-02-04 07:32:38 -08:00
|
|
|
-rtox_requirements/dev_requirements.txt
|
2021-04-26 16:44:36 -07:00
|
|
|
commands =
|
2021-07-26 13:25:58 -07:00
|
|
|
pytest --cov={envsitepackagesdir}/datahub --cov={envsitepackagesdir}/datahub_provider \
|
2022-02-04 07:32:38 -08:00
|
|
|
py3-quick: -m 'not integration and not slow_integration' --junit-xml=junit.quick.xml \
|
|
|
|
py36-full: --cov-fail-under 68 --junit-xml=junit.full.xml \
|
|
|
|
--continue-on-collection-errors \
|
|
|
|
-vv \
|
|
|
|
py39-full: --cov-fail-under 70 --junit-xml=junit.full.xml \
|
2021-10-26 07:21:56 +02:00
|
|
|
--continue-on-collection-errors \
|
2021-07-26 13:25:58 -07:00
|
|
|
-vv
|
2021-04-26 16:44:36 -07:00
|
|
|
|
2021-07-17 20:00:50 -07:00
|
|
|
setenv =
|
|
|
|
AIRFLOW_HOME = /tmp/airflow/thisshouldnotexist-{envname}
|
|
|
|
|
2021-07-26 13:25:58 -07:00
|
|
|
[testenv:py3-airflow1]
|
2021-09-23 15:02:45 -04:00
|
|
|
deps =
|
|
|
|
.[dev-airflow1]
|
2021-07-17 20:00:50 -07:00
|
|
|
|
2022-02-04 07:32:38 -08:00
|
|
|
[testenv:py39-full]
|
|
|
|
deps =
|
|
|
|
-rtox_requirements/py39-full_requirements.txt
|
|
|
|
|
|
|
|
[testenv:py36-full]
|
2021-09-23 15:02:45 -04:00
|
|
|
deps =
|
2022-02-04 07:32:38 -08:00
|
|
|
-rtox_requirements/py36-full_requirements.txt
|