-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Segragate dbt versions to test by target
- Loading branch information
Claudio Diniz
committed
Mar 18, 2023
1 parent
7682bf8
commit d1ead7d
Showing
3 changed files
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ -z "$1" ]; then | ||
echo 'Please provide profile name' | ||
exit 1 | ||
fi | ||
|
||
PROFILE="$1" | ||
|
||
./run-tests-on-dbt-version.sh "run-jaffle-shop-tests" "$PROFILE" "1.3.3" | ||
./run-tests-on-dbt-version.sh "run-jaffle-shop-tests" "$PROFILE" "1.4.0" | ||
# Source the script that contains the run_tests function and versions | ||
source ./run-tests-helper.sh | ||
|
||
run_tests "run-jaffle-shop-tests" "$PROFILE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
function run_tests() { | ||
local TEST_SUITE=$1 | ||
local PROFILE=$2 | ||
|
||
if [ "$PROFILE" == "postgres" ]; then | ||
VERSIONS="1.3.3 1.4.0" | ||
elif [ "$PROFILE" == "bigquery" ]; then | ||
VERSIONS="1.3.2" | ||
elif [ "$PROFILE" == "snowflake" ]; then | ||
VERSIONS="1.3.1" | ||
else | ||
echo "Invalid profile name: $PROFILE" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$TEST_SUITE" ]; then | ||
echo 'Please provide test suite name' | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$PROFILE" ]; then | ||
echo 'Please provide profile name' | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$VERSIONS" ]; then | ||
echo 'Please provide versions to test' | ||
exit 1 | ||
fi | ||
|
||
for DBT_VERSION in $VERSIONS; do | ||
echo $DBT_VERSION | ||
./run-tests-on-dbt-version.sh "$TEST_SUITE" "$PROFILE" "$DBT_VERSION" | ||
done | ||
} |