diff --git a/tox.ini b/tox.ini index e49c1ebe..7c19bef0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,11 @@ [tox] skipsdist = True envlist = lint_all, testenv -# this needs to be defined on a single line. tox has problems with multiline lists -# This list determined which adapters will be run by dbt centralized testing -supported_adapters = postgres, snowflake, redshift, bigquery + [testenv] +setenv = + SUPPORTED_ADAPTERS = postgres,snowflake,redshift,bigquery passenv = # postgres env vars POSTGRES_HOST @@ -34,46 +34,23 @@ passenv = DBT_ENV_SECRET_BIGQUERY_KEYFILE_JSON BIGQUERY_SCHEMA -# This is required to ensure that the correct adapters are tested -[testenv:list_supported_adapters] -allowlist_externals = echo -commands = echo {[tox]supported_adapters} - -# 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 -# Also adds in pytest testing. These are very basic and don't require dbt. -# pytest runs at the root of the repo, so we need to cd out of the integration_tests directory [testenv:dbt_integration_snowflake] changedir = integration_tests -allowlist_externals = - dbt - bash - {[testenv:dbt_integration_pytest]allowlist_externals} +allowlist_externals = dbt skip_install = true -deps = {[testenv:dbt_integration_pytest]deps} commands = dbt --version dbt debug --target snowflake dbt deps --target snowflake dbt build --target snowflake --full-refresh - bash -c "cd {toxinidir} && {[testenv:dbt_integration_pytest]commands}" - # Postgres integration tests for centralized dbt testing # run dbt commands directly, assumes dbt is already installed in environment [testenv:dbt_integration_postgres] changedir = integration_tests -allowlist_externals = - dbt +allowlist_externals = dbt skip_install = true commands = dbt --version @@ -84,8 +61,7 @@ commands = # BigQuery integration tests for centralized dbt testing [testenv:dbt_integration_bigquery] changedir = integration_tests -allowlist_externals = - dbt +allowlist_externals = dbt skip_install = true commands = dbt --version @@ -96,8 +72,7 @@ commands = # redshift integration tests for centralized dbt testing [testenv:dbt_integration_redshift] changedir = integration_tests -allowlist_externals = - dbt +allowlist_externals = dbt skip_install = true commands = dbt --version