Skip to content

Commit 2b0334a

Browse files
committed
test-warehouse: add dbt fusion
1 parent ca0c288 commit 2b0334a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/test-warehouse.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ on:
3131
required: false
3232
default: "latest_official"
3333
description: dbt's version to test with
34+
use-dbt-fusion:
35+
type: boolean
36+
required: false
37+
description: Use dbt-fusion to run tests
38+
default: false
3439

3540
workflow_call:
3641
inputs:
@@ -109,11 +114,16 @@ jobs:
109114
run: pip install databricks-sql-connector==2.9.3
110115

111116
- name: Install dbt
117+
if: !inputs.use-dbt-fusion
112118
run:
113119
pip install${{ (inputs.dbt-version == 'latest_pre' && ' --pre') || '' }}
114120
"dbt-core${{ (!startsWith(inputs.dbt-version, 'latest') && format('=={0}', inputs.dbt-version)) || '' }}"
115121
"dbt-${{ (inputs.warehouse-type == 'databricks_catalog' && 'databricks') || (inputs.warehouse-type == 'spark' && 'spark[PyHive]') || (inputs.warehouse-type == 'athena' && 'athena-community') || inputs.warehouse-type }}${{ (!startsWith(inputs.dbt-version, 'latest') && format('~={0}', inputs.dbt-version)) || '' }}"
116122

123+
- name: Install dbt-fusion
124+
if: inputs.use-dbt-fusion
125+
run: curl -fsSL https://public.cdn.getdbt.com/fs/install/install.sh | sh -s -- --update
126+
117127
- name: Install Elementary
118128
run: pip install "./elementary[${{ (inputs.warehouse-type == 'databricks_catalog' && 'databricks') || inputs.warehouse-type }}]"
119129

@@ -139,7 +149,7 @@ jobs:
139149
140150
- name: Test
141151
working-directory: "${{ env.TESTS_DIR }}/tests"
142-
run: py.test -n8 -vvv --target "${{ inputs.warehouse-type }}" --junit-xml=test-results.xml --html=detailed_report_${{ inputs.warehouse-type }}_dbt_${{ inputs.dbt-version }}.html --self-contained-html --clear-on-end
152+
run: py.test -n8 -vvv --target "${{ inputs.warehouse-type }}" --junit-xml=test-results.xml --html=detailed_report_${{ inputs.warehouse-type }}_dbt_${{ inputs.dbt-version }}.html --self-contained-html --clear-on-end ${{ (inputs.use-dbt-fusion && '--runner-method fusion') || '' }}
143153

144154
- name: Upload test results
145155
if: always()

0 commit comments

Comments
 (0)