From 717b225f0c6dabcd392434a8983b94f8821d383e Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Mon, 10 Jun 2024 21:34:12 -0500 Subject: [PATCH] add bash to allowed commands --- tox.ini | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/tox.ini b/tox.ini index 5205d1fd..4659e200 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,14 @@ passenv = SNOWFLAKE_TEST_WAREHOUSE SNOWFLAKE_TEST_SCHEMA +# Uses pytest to run tests, very basic and doesn't require dbt +[testenv:dbt_integration_pytest] +changedir = {toxinidir} +allowlist_externals = pytest +deps = pytest +skip_install = true +commands = + pytest {posargs} tests/functional # Snowflake integration tests for centralized dbt testing # run dbt commands directly, assumes dbt is already installed in environment @@ -29,6 +37,7 @@ passenv = changedir = integration_tests allowlist_externals = dbt + bash {[testenv:dbt_integration_pytest]allowlist_externals} skip_install = true deps = {[testenv:dbt_integration_pytest]deps} @@ -47,23 +56,33 @@ commands = changedir = integration_tests allowlist_externals = dbt - bash - {[testenv:dbt_integration_pytest]allowlist_externals} skip_install = true -deps = {[testenv:dbt_integration_pytest]deps} commands = dbt --version dbt debug --target postgres dbt deps --target postgres dbt build --target postgres --full-refresh - bash -c "cd {toxinidir} && {[testenv:dbt_integration_pytest]commands}" -# Postgres integration tests for centralized dbt testing -# Uses pytest to run tests, assumes dbt is already installed in environment -[testenv:dbt_integration_pytest] -changedir = {toxinidir} -allowlist_externals = pytest -deps = pytest +# BigQuery integration tests for centralized dbt testing +[testenv:dbt_integration_bigquery] +changedir = integration_tests +allowlist_externals = + dbt skip_install = true commands = - pytest {posargs} tests/functional + dbt --version + dbt debug --target postgres + dbt deps --target postgres + dbt build --target postgres --full-refresh + +# redshift integration tests for centralized dbt testing +[testenv:dbt_integration_redshift] +changedir = integration_tests +allowlist_externals = + dbt +skip_install = true +commands = + dbt --version + dbt debug --target postgres + dbt deps --target postgres + dbt build --target postgres --full-refresh \ No newline at end of file