Skip to content

Commit

Permalink
[BACKPORT] adding allowlist_externals for bash script to tox tests, c…
Browse files Browse the repository at this point in the history
…hanging pas… (#547)

* adding allowlist_externals for bash script to tox tests, changing passenv spacing

* add changie
  • Loading branch information
McKnight-42 authored Dec 9, 2022
1 parent 52dacf9 commit 2756ec0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20221209-143353.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: fix post new release tox issues around passenv and allowlist_externals
time: 2022-12-09T14:33:53.134371-06:00
custom:
Author: McKnight-42
Issue: "547"
PR: "547"
37 changes: 30 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,80 @@
skipsdist = True
envlist = unit, flake8, integration-spark-thrift


[testenv:flake8]
allowlist_externals =
/bin/bash
basepython = python3.8
commands = /bin/bash -c '$(which flake8) --select=E,W,F --ignore=W504 dbt/'
passenv = DBT_* PYTEST_ADDOPTS
passenv =
DBT_*
PYTEST_ADDOPTS
deps =
-r{toxinidir}/dev_requirements.txt

[testenv:unit]
allowlist_externals =
/bin/bash
basepython = python3.8
commands = /bin/bash -c '{envpython} -m pytest -v {posargs} tests/unit'
passenv = DBT_* PYTEST_ADDOPTS
passenv =
DBT_*
PYTEST_ADDOPTS
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev_requirements.txt

[testenv:integration-spark-databricks-http]
allowlist_externals =
/bin/bash
basepython = python3.8
commands = /bin/bash -c '{envpython} -m pytest -v tests/specs/spark-databricks-http.dbtspec'
passenv = DBT_* PYTEST_ADDOPTS
passenv =
DBT_*
PYTEST_ADDOPTS
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev_requirements.txt
-e.

[testenv:integration-spark-databricks-odbc-cluster]
allowlist_externals =
/bin/bash
basepython = python3.8
commands = /bin/bash -c '{envpython} -m pytest -v tests/specs/spark-databricks-odbc-cluster.dbtspec'
/bin/bash -c '{envpython} -m pytest -v -m profile_databricks_cluster {posargs} -n4 tests/integration/*'
passenv = DBT_* PYTEST_ADDOPTS ODBC_DRIVER
passenv =
DBT_*
PYTEST_ADDOPTS ODBC_DRIVER
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev_requirements.txt
-e.

[testenv:integration-spark-databricks-odbc-sql-endpoint]
allowlist_externals =
/bin/bash
basepython = python3.8
commands = /bin/bash -c '{envpython} -m pytest -v tests/specs/spark-databricks-odbc-sql-endpoint.dbtspec'
/bin/bash -c '{envpython} -m pytest -v -m profile_databricks_sql_endpoint {posargs} -n4 tests/integration/*'
passenv = DBT_* PYTEST_ADDOPTS ODBC_DRIVER
passenv =
DBT_*
PYTEST_ADDOPTS ODBC_DRIVER
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev_requirements.txt
-e.


[testenv:integration-spark-thrift]
allowlist_externals =
/bin/bash
basepython = python3.8
commands = /bin/bash -c '{envpython} -m pytest -v tests/specs/spark-thrift.dbtspec'
/bin/bash -c '{envpython} -m pytest -v -m profile_apache_spark {posargs} -n4 tests/integration/*'
passenv = DBT_* PYTEST_ADDOPTS
passenv =
DBT_*
PYTEST_ADDOPTS
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev_requirements.txt
Expand Down

0 comments on commit 2756ec0

Please sign in to comment.