Skip to content

Commit c99cd92

Browse files
committed
Further simplify workflows
1 parent c4442f2 commit c99cd92

5 files changed

Lines changed: 20 additions & 54 deletions

File tree

.github/workflows/dbt_v1.10.15_bigquery_build_full_refresh.yml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
env:
14+
# Environment variables
1415
PYTHON_VERSION: "3.10"
1516
DBT_PROJECT_DIR: "."
1617
DBT_CORE_VERSION: "1.10.15"
@@ -29,23 +30,6 @@ jobs:
2930
python -m pip install --upgrade pip
3031
pip install dbt-core==${{ DBT_CORE_VERISON }} dbt-bigquery
3132
32-
- name: Create dbt profiles.yml for BigQuery
33-
run: |
34-
mkdir -p ./integration_tests/profiles/bigquery
35-
echo "default:
36-
outputs:
37-
dev:
38-
type: bigquery
39-
method: service-account
40-
project: dev-ci-testing
41-
keyfile: ./creds.json
42-
dataset: connector
43-
threads: 8
44-
timeout_seconds: 300
45-
priority: interactive
46-
target: dev" > ./integration_tests/profiles/bigquery/profiles.yml
47-
working-directory: ${{ env.DBT_PROJECT_DIR }}
48-
4933
- name: Create BigQuery credentials file
5034
run: |
5135
echo "${{ secrets.TUVA_BIGQUERY_TOKEN }}" | base64 --decode > ./creds.json
@@ -62,9 +46,4 @@ jobs:
6246
- name: Build dbt models (full-refresh)
6347
run: |
6448
dbt build --full-refresh --profiles-dir ./integration_tests/profiles/bigquery
65-
working-directory: ${{ env.DBT_PROJECT_DIR }}
66-
67-
- name: Get the result
68-
if: ${{ always() }}
69-
run: echo "${{ steps.dbt-build.outputs.result }}"
70-
shell: bash
49+
working-directory: ${{ env.DBT_PROJECT_DIR }}

.github/workflows/dbt_v1.10.15_duckdb_build_full_refresh.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
env:
14+
# Environment variables
1415
PYTHON_VERSION: "3.10"
1516
DBT_PROJECT_DIR: "."
17+
DBT_CORE_VERSION: "1.10.15"
18+
19+
# Connection variables
1620
MOTHERDUCK_TOKEN: ${{ secrets.DBT_MOTHERDUCK_TOKEN }}
1721

1822
steps:
@@ -26,9 +30,8 @@ jobs:
2630
- name: Install dbt-core and DuckDB adapter
2731
run: |
2832
python -m pip install --upgrade pip
29-
pip install dbt-core==1.10.15 dbt-duckdb
33+
pip install dbt-core==${{ DBT_CORE_VERSION}} dbt-duckdb
3034
31-
# Create dbt profile for DuckDB/MotherdDuck, may move to checked-in file later
3235
- name: Create dbt profile for DuckDB/MotherDuck
3336
run: |
3437
mkdir -p ./integration_tests/profiles/duckdb
@@ -76,9 +79,4 @@ jobs:
7679
- name: Build dbt models (full-refresh)
7780
run: |
7881
dbt build --full-refresh --profiles-dir ./integration_tests/profiles/duckdb
79-
working-directory: ${{ env.DBT_PROJECT_DIR }}
80-
81-
- name: Get the result
82-
if: ${{ always() }}
83-
run: echo "${{ steps.dbt-build.outputs.result }}"
84-
shell: bash
82+
working-directory: ${{ env.DBT_PROJECT_DIR }}

.github/workflows/dbt_v1.10.15_redshift_build_full_fresh.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jobs:
1010
name: dbt full refresh and test on Redshift
1111
runs-on: ubuntu-latest
1212

13-
# Set the environment variables dbt needs to connect
1413
env:
15-
# Project-level environment variables
14+
# Environment variables
1615
DBT_PROJECT_DIR: "."
1716
PYTHON_VERSION: "3.10"
1817
DBT_CORE_VERSION: "1.10.15"
19-
18+
19+
# Connection variables
2020
REDSHIFT_HOST: ${{ secrets.DBT_REDSHIFT_HOST }}
2121
REDSHIFT_USER: ${{ secrets.DBT_REDSHIFT_CI_USER }}
2222
REDSHIFT_PASSWORD: ${{ secrets.DBT_REDSHIFT_CI_PASSWORD }}
@@ -46,9 +46,4 @@ jobs:
4646

4747
- name: Build dbt models
4848
working-directory: ${{ env.DBT_PROJECT_DIR }}
49-
run: dbt build --full-refresh --profiles-dir ./integration_tests/profiles/redshift
50-
51-
- name: Get the result
52-
if: ${{ always() }}
53-
run: echo "${{ steps.dbt-build.outputs.result }}"
54-
shell: bash
49+
run: dbt build --full-refresh --profiles-dir ./integration_tests/profiles/redshift

.github/workflows/dbt_v1.10.15_snowflake_build_full_refresh.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Snowflake CICD Full Refresh
2-
32
on:
43
pull_request:
54
branches:
@@ -12,18 +11,18 @@ concurrency:
1211
# Don't cancel in-progress runs automatically
1312
cancel-in-progress: false
1413

15-
env:
16-
DBT_PROJECT_DIR: "."
17-
PYTHON_VERSION: "3.10"
18-
DBT_CORE_VERSION: "1.10.15"
19-
2014
jobs:
2115
dbt_run:
2216
name: dbt full refresh and test on Snowflake
2317
runs-on: ubuntu-latest
2418

25-
# Set the environment variables dbt needs to connect
2619
env:
20+
# Environment variables
21+
DBT_PROJECT_DIR: "."
22+
PYTHON_VERSION: "3.10"
23+
DBT_CORE_VERSION: "1.10.15"
24+
25+
# Connection variables
2726
DBT_SNOWFLAKE_DEV_ACCOUNT: ${{ secrets.DBT_TUVA_SNOWFLAKE_ACCOUNT }}
2827
DBT_SNOWFLAKE_DEV_CI_DATABASE: ${{ secrets.DBT_TUVA_CI_DATABASE }}
2928
DBT_SNOWFLAKE_DEV_CI_PASSWORD: ${{ secrets.DBT_SNOWFLAKE_CI_PASSWORD }}
@@ -56,9 +55,4 @@ jobs:
5655

5756
- name: Run build models
5857
working-directory: ${{ env.DBT_PROJECT_DIR }}
59-
run: dbt build --full-refresh --profiles-dir ./integration_tests/profiles/snowflake
60-
61-
- name: Get the result
62-
if: ${{ always() }}
63-
run: echo "${{ steps.dbt-build.outputs.result }}"
64-
shell: bash
58+
run: dbt build --full-refresh --profiles-dir ./integration_tests/profiles/snowflake

integration_tests/profiles/bigquery/profiles.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ default:
44
ci:
55
type: bigquery
66
method: service-account
7-
keyfile: ./creds.json
87
project: dev-ci-testing
8+
keyfile: ./creds.json
99
dataset: connector
1010
threads: 8
1111
timeout_seconds: 300

0 commit comments

Comments
 (0)