Skip to content

Commit

Permalink
run tests on all adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbanin committed Dec 10, 2018
1 parent 9b22332 commit 464d63f
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 7 deletions.
51 changes: 46 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
steps:
- checkout

- run:
run: setup_creds
command: |
echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json
- restore_cache:
key: deps1-{{ .Branch }}

Expand All @@ -25,7 +30,7 @@ jobs:
cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml
- run:
name: "Run tests (postgres)"
name: "Run Tests - Postgres"
environment:
CI_DBT_USER: root
CI_DBT_PASS: ''
Expand All @@ -34,10 +39,46 @@ jobs:
command: |
. venv/bin/activate
cd integration_tests
dbt deps
dbt seed --full-refresh
dbt run --full-refresh --exclude test_insert_by_period
dbt test --exclude test_insert_by_period
dbt deps --target postgres
dbt run --target postgres --full-refresh
dbt test --target postgres
- run:
name: "Run Tests - Redshift"
command: |
. venv/bin/activate
echo `pwd`
cd integration_tests
dbt deps --target redshift
dbt seed --target redshift --full-refresh
dbt run --target redshift
dbt test --target redshift
- run:
name: "Run Tests - Snowflake"
command: |
. venv/bin/activate
echo `pwd`
cd integration_tests
dbt deps --target snowflake
dbt seed --target snowflake --full-refresh
dbt run --target snowflake
dbt test --target snowflake
- run:
name: "Run Tests - BigQuery"
environment:
GCLOUD_SERVICE_KEY_PATH: "/home/circleci/gcloud-service-key.json"

command: |
. venv/bin/activate
echo `pwd`
cd integration_tests
dbt deps --target bigquery
dbt seed --target bigquery --full-refresh
dbt run --target bigquery
dbt test --target bigquery
- save_cache:
key: deps1-{{ .Branch }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{
config(
materialized = 'view')
materialized = 'view',
enabled=(target.type == 'redshift')
)
}}

select *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
period = 'month',
timestamp_field = 'created_at',
start_date = '2018-01-01',
stop_date = '2018-06-01')
stop_date = '2018-06-01',
enabled=(target.type == 'redshift')
)
}}

with events as (
Expand Down

0 comments on commit 464d63f

Please sign in to comment.