@@ -32,9 +32,10 @@ defaults:
32
32
shell : bash
33
33
34
34
env :
35
- PYTHON_TARGET_VERSION : 3.11
35
+ PYTHON_TARGET_VERSION : 3.8
36
36
NOTIFICATION_PREFIX : " [Internal Archive Release]"
37
37
TEMP_PROFILE_NAME : " temp_aws_profile"
38
+ USE_HATCH : " ${{ contains(fromJSON( '[" postgres"]' ), inputs.dbms_name) }}"
38
39
39
40
jobs :
40
41
job-setup :
@@ -86,26 +87,26 @@ jobs:
86
87
# Testing with Tox
87
88
#
88
89
- name : " Install Python Dependencies"
89
- if : contains(fromJSON( '["redshift", "snowflake", "bigquery"]' ), inputs.dbms_name)
90
+ if : ! " ${{ env.USE_HATCH }} "
90
91
run : |
91
92
python -m pip install --user --upgrade pip
92
93
python -m pip install tox
93
94
python -m pip --version
94
95
python -m tox --version
95
96
96
97
- name : " Run Tests using tox"
97
- if : contains(fromJSON( '["redshift", "snowflake", "bigquery"]' ), inputs.dbms_name)
98
+ if : ! " ${{ env.USE_HATCH }} "
98
99
run : tox
99
100
100
101
#
101
102
# Testing with Hatch
102
103
#
103
104
- name : " Setup `hatch`"
104
- if : contains(fromJSON('["postgres"]'), inputs.dbms_name)
105
+ if : " ${{ env.USE_HATCH }} "
105
106
uses : dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
106
107
107
108
- name : " Run Tests using hatch"
108
- if : contains(fromJSON('["postgres"]'), inputs.dbms_name)
109
+ if : " ${{ env.USE_HATCH }} "
109
110
run : hatch run unit-tests:all
110
111
111
112
# ###################
@@ -116,7 +117,7 @@ jobs:
116
117
name : ' Integration Tests (Tox)'
117
118
runs-on : ubuntu-latest
118
119
needs : [job-setup]
119
- if : contains(fromJSON( '["redshift", "snowflake", "bigquery"]' ), inputs.dbms_name)
120
+ if : ! " ${{ env.USE_HATCH }} "
120
121
121
122
env :
122
123
TOXENV : integration
@@ -179,7 +180,7 @@ jobs:
179
180
run-integration-tests-hatch :
180
181
name : ' Integration Tests (Hatch)'
181
182
needs : [job-setup]
182
- if : contains(fromJSON('["postgres"]'), inputs.dbms_name)
183
+ if : ! " ${{ env.USE_HATCH }} "
183
184
184
185
uses : " dbt-labs/dbt-postgres/.github/workflows/integration-tests.yml@main"
185
186
with :
@@ -253,13 +254,13 @@ jobs:
253
254
v="${base}${new_number}"
254
255
tee <<< "version = \"${v}\"" "${version_file}"
255
256
if [ -f "${setup_file}" ]; then
256
- sed -i "s/^package_version = \".*\" /package_version = \"${v}\"/" "${setup_file}"
257
+ sed -i "s/^package_version = .*$ /package_version = \"${v}\"/" "${setup_file}"
257
258
fi
258
259
else
259
260
v="${version_in_file}+build1"
260
261
tee <<< "version = \"${v}\"" "${version_file}"
261
262
if [ -f "${setup_file}" ]; then
262
- sed -i "s/^package_version = \".*\" /package_version = \"${v}\"/" "${setup_file}"
263
+ sed -i "s/^package_version = .*$ /package_version = \"${v}\"/" "${setup_file}"
263
264
fi
264
265
fi
265
266
@@ -271,18 +272,18 @@ jobs:
271
272
# 1. Build with setup.py
272
273
#
273
274
- name : " Build Distributions - scripts/build-dist.sh"
274
- if : contains(fromJSON( '["redshift", "snowflake", "bigquery", "spark"]' ), inputs.dbms_name)
275
+ if : ! " ${{ env.USE_HATCH }} "
275
276
run : scripts/build-dist.sh
276
277
277
278
#
278
279
# 2. Build with Hatch
279
280
#
280
281
- name : " Setup `hatch`"
281
- if : contains(fromJSON('["postgres"]'), inputs.dbms_name)
282
+ if : " ${{ env.USE_HATCH }} "
282
283
uses : dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
283
284
284
285
- name : " Build Distributions - hatch"
285
- if : contains(fromJSON('["postgres"]'), inputs.dbms_name)
286
+ if : " ${{ env.USE_HATCH }} "
286
287
run : hatch build
287
288
288
289
# ##################
0 commit comments