forked from tuva-health/tuva
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbt_v1.10.15_snowflake_build_full_refresh.yml
More file actions
51 lines (41 loc) · 1.69 KB
/
dbt_v1.10.15_snowflake_build_full_refresh.yml
File metadata and controls
51 lines (41 loc) · 1.69 KB
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
name: Snowflake CICD Full Refresh
on:
workflow_dispatch: # Allows manual trigger from UI
concurrency:
# Ensure only one Snowflake workflow runs at a time to prevent database conflicts
group: ci-snowflake
cancel-in-progress: false
jobs:
dbt_run:
name: dbt full refresh and test on Snowflake
runs-on: ubuntu-latest
env:
# Environment variables
DBT_PROJECT_DIR: "./integration_tests"
PYTHON_VERSION: "3.10"
DBT_CORE_VERSION: "1.10.15"
# Connection variables
DBT_SNOWFLAKE_CI_ACCOUNT: ${{ secrets.DBT_SNOWFLAKE_CI_ACCOUNT }}
DBT_SNOWFLAKE_CI_DATABASE: ${{ secrets.DBT_SNOWFLAKE_CI_DATABASE }}
DBT_SNOWFLAKE_CI_PASSWORD: ${{ secrets.DBT_SNOWFLAKE_CI_PASSWORD }}
DBT_SNOWFLAKE_CI_ROLE: ${{ secrets.DBT_SNOWFLAKE_CI_ROLE }}
DBT_SNOWFLAKE_CI_SCHEMA: ${{ secrets.DBT_SNOWFLAKE_CI_SCHEMA }}
DBT_SNOWFLAKE_CI_USER: ${{ secrets.DBT_SNOWFLAKE_CI_USER }}
DBT_SNOWFLAKE_CI_WAREHOUSE: ${{ secrets.DBT_SNOWFLAKE_CI_WAREHOUSE }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dbt
run: |
python -m pip install --upgrade pip
pip install dbt-core==${{ env.DBT_CORE_VERSION }} dbt-snowflake
- name: Install dbt dependencies
run: dbt deps --profiles-dir ./integration_tests/profiles/snowflake
- name: Test Connection
run: dbt debug --profiles-dir ./integration_tests/profiles/snowflake
- name: Run build models
run: dbt build --full-refresh --profiles-dir ./integration_tests/profiles/snowflake