@@ -2,7 +2,8 @@ version: 2.1
2
2
3
3
jobs :
4
4
5
- integration-tests :
5
+ integration-tests-core :
6
+
6
7
docker :
7
8
- image : cimg/python:3.9.9
8
9
- image : cimg/postgres:14.0
@@ -13,19 +14,27 @@ jobs:
13
14
DBT_PROFILES_DIR : ./integration_tests/ci
14
15
DBT_PROJECT_DIR : ./integration_tests
15
16
BIGQUERY_SERVICE_KEY_PATH : " /home/circleci/bigquery-service-key.json"
16
- DBT_VERSION : 1.6.0
17
+ DBT_VERSION : 1.6.*
17
18
18
19
steps :
19
20
- checkout
20
- - run :
21
- name : Install Python packages
21
+ - run : &pip-install-core
22
+ name : Install core Python packages & dbt-core
22
23
command : |
23
24
python3 -m venv venv
24
25
. venv/bin/activate
25
26
pip install -U pip setuptools wheel
26
- pip install dbt-core==$DBT_VERSION dbt-postgres==$DBT_VERSION dbt-bigquery==$DBT_VERSION dbt-snowflake==$DBT_VERSION dbt-duckdb==$DBT_VERSION
27
+ pip install " dbt-core==$DBT_VERSION"
27
28
28
29
- run :
30
+ name : Install dbt adapter packages
31
+ command : |
32
+ python3 -m venv venv
33
+ . venv/bin/activate
34
+ pip install "dbt-postgres==$DBT_VERSION" "dbt-bigquery==$DBT_VERSION" "dbt-snowflake==$DBT_VERSION"
35
+ pip install "dbt-duckdb==$DBT_VERSION"
36
+
37
+ - run : &dbt-deps
29
38
name : Install dbt dependencies
30
39
command : |
31
40
. venv/bin/activate
@@ -74,12 +83,65 @@ jobs:
74
83
- store_artifacts :
75
84
path : ./logs
76
85
86
+ integration-tests-spark-thrift :
87
+
88
+ docker :
89
+ - image : cimg/python:3.9.9
90
+ - image : godatadriven/spark:3.1.1
91
+ environment :
92
+ WAIT_FOR : localhost:5432
93
+ command : >
94
+ --class org.apache.spark.sql.hive.thriftserver.HiveThriftServer2
95
+ --name Thrift JDBC/ODBC Server
96
+ - image : postgres:9.6.17-alpine
97
+ environment :
98
+ POSTGRES_USER : dbt
99
+ POSTGRES_PASSWORD : dbt
100
+ POSTGRES_DB : metastore
101
+
102
+ resource_class : small
103
+
104
+ environment :
105
+ DBT_PROFILES_DIR : ./integration_tests/ci
106
+ DBT_PROJECT_DIR : ./integration_tests
107
+ DBT_VERSION : 1.6.*
108
+
109
+ steps :
110
+ - checkout
111
+ - run :
112
+ name : Install Ubuntu packages
113
+ command : |
114
+ sudo apt-get update
115
+ sudo apt-get install libsasl2-dev libsasl2-2
116
+ - run : *pip-install-core
117
+ - run :
118
+ name : Install dbt adapter packages
119
+ command : |
120
+ python3 -m venv venv
121
+ . venv/bin/activate
122
+ pip install dbt-spark "dbt-spark[PyHive]"
123
+ - run : *dbt-deps
124
+ - run :
125
+ name : Wait for Spark-Thrift
126
+ command : dockerize -wait tcp://localhost:10000 -timeout 15m -wait-retry-interval 5s
127
+ - run :
128
+ name : " Run Tests - Spark"
129
+ command : |
130
+ . venv/bin/activate
131
+ dbt build -t spark --project-dir $DBT_PROJECT_DIR
132
+
133
+ - store_artifacts :
134
+ path : ./logs
135
+
77
136
workflows :
78
137
version : 2
79
138
test-all :
80
139
jobs :
81
140
- hold :
82
141
type : approval
83
- - integration-tests :
142
+ - integration-tests-core :
143
+ requires :
144
+ - hold
145
+ - integration-tests-spark-thrift :
84
146
requires :
85
147
- hold
0 commit comments