This repository was archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathconfig.yml
108 lines (90 loc) · 3.86 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
version: 2.1
jobs:
build:
docker:
- image: cimg/python:3.9.9
- image: circleci/postgres:9.6.5-alpine-ram
steps:
- checkout
- run:
run: setup_creds
command: |
echo $BIGQUERY_SERVICE_ACCOUNT_JSON > ${HOME}/bigquery-service-key.json
- restore_cache:
key: deps1-{{ .Branch }}
- run:
name: "Setup dbt"
command: |
python3 -m venv dbt_venv
. dbt_venv/bin/activate
pip install --upgrade pip setuptools
pip install --pre dbt-core dbt-postgres dbt-redshift dbt-snowflake dbt-bigquery
mkdir -p ~/.dbt
cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml
- run:
name: "Run Tests - Postgres"
environment:
POSTGRES_TEST_HOST: localhost
POSTGRES_TEST_USER: root
POSTGRES_TEST_PASS: ''
POSTGRES_TEST_PORT: 5432
POSTGRES_TEST_DBNAME: circle_test
command: |
. dbt_venv/bin/activate
cd integration_tests
dbt --warn-error deps --target postgres
dbt --warn-error run-operation drop_audit_schema --target postgres
dbt --warn-error run --target postgres --full-refresh
dbt --warn-error run --target postgres
dbt --warn-error run-operation drop_audit_schema --target postgres
dbt --warn-error run-operation create_legacy_audit_table --target postgres
dbt --warn-error run --target postgres --full-refresh
dbt --warn-error run --target postgres
- run:
name: "Run Tests - Redshift"
command: |
. dbt_venv/bin/activate
echo `pwd`
cd integration_tests
dbt --warn-error deps --target redshift
dbt --warn-error run-operation drop_audit_schema --target redshift
dbt --warn-error run --target redshift --full-refresh
dbt --warn-error run --target redshift
dbt --warn-error run-operation drop_audit_schema --target redshift
dbt --warn-error run-operation create_legacy_audit_table --target redshift
dbt --warn-error run --target redshift --full-refresh
dbt --warn-error run --target redshift
- run:
name: "Run Tests - Snowflake"
command: |
. dbt_venv/bin/activate
echo `pwd`
cd integration_tests
# dbt --warn-error deps --target snowflake
# dbt --warn-error run-operation drop_audit_schema --target snowflake
# dbt --warn-error run --target snowflake --full-refresh
# dbt --warn-error run --target snowflake
dbt --warn-error run-operation drop_audit_schema --target snowflake
dbt --warn-error run-operation create_legacy_audit_table --target snowflake
dbt --warn-error run --target snowflake --full-refresh
dbt --warn-error run --target snowflake
- run:
name: "Run Tests - BigQuery"
environment:
BIGQUERY_SERVICE_KEY_PATH: "/home/circleci/bigquery-service-key.json"
command: |
. dbt_venv/bin/activate
echo `pwd`
cd integration_tests
dbt --warn-error deps --target bigquery
dbt --warn-error run-operation drop_audit_schema --target bigquery
dbt --warn-error run --target bigquery --full-refresh
dbt --warn-error run --target bigquery
dbt --warn-error run-operation drop_audit_schema --target bigquery
dbt --warn-error run-operation create_legacy_audit_table --target bigquery
dbt --warn-error run --target bigquery --full-refresh
dbt --warn-error run --target bigquery
- save_cache:
key: deps1-{{ .Branch }}
paths:
- "dbt_venv"