Skip to content

Commit

Permalink
add bash to allowed commands
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop committed Jun 11, 2024
1 parent b4fb984 commit 717b225
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand All @@ -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

0 comments on commit 717b225

Please sign in to comment.