Skip to content

Commit

Permalink
Exit the integration test script with a non-zero exit code if any dbt…
Browse files Browse the repository at this point in the history
… command fails (#569)
  • Loading branch information
dbeatty10 authored May 3, 2022
1 parent 913ba52 commit 5ab28f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ _seeds="--full-refresh"
if [[ ! -z $2 ]]; then _models="--models $2"; fi
if [[ ! -z $3 ]]; then _seeds="--select $3 --full-refresh"; fi

dbt deps --target $1
dbt seed --target $1 $_seeds
dbt deps --target $1 || exit 1
dbt seed --target $1 $_seeds || exit 1
if [ $1 == 'redshift' ]; then
dbt run -x -m test_insert_by_period --full-refresh --target redshift
dbt run -x -m test_insert_by_period --full-refresh --target redshift || exit 1
fi
dbt run -x --target $1 $_models
dbt test -x --target $1 $_models
dbt run -x --target $1 $_models || exit 1
dbt test -x --target $1 $_models || exit 1

0 comments on commit 5ab28f8

Please sign in to comment.