forked from tuva-health/tuva-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbt_v1.10.15_fabric_build_full_refresh.yml
More file actions
58 lines (47 loc) · 2.01 KB
/
Copy pathdbt_v1.10.15_fabric_build_full_refresh.yml
File metadata and controls
58 lines (47 loc) · 2.01 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
52
53
54
55
56
57
58
name: Fabric CICD Full Refresh
on:
workflow_dispatch: # Allows manual trigger from UI
concurrency:
# Ensure only one Fabric workflow runs at a time to prevent database conflicts
group: ci-fabric
cancel-in-progress: false
jobs:
dbt_run:
name: dbt full refresh and test on Fabric
runs-on: ubuntu-latest
env:
# Environment variables
PYTHON_VERSION: "3.10"
DBT_PROJECT_DIR: "./integration_tests"
DBT_CORE_VERSION: "1.10.15"
# Fabric connection variables
DBT_FABRIC_CI_SERVER: ${{ secrets.DBT_FABRIC_CI_SERVER }}
DBT_FABRIC_CI_DATABASE: ${{ secrets.DBT_FABRIC_CI_DATABASE }}
DBT_FABRIC_CI_SCHEMA: ${{ secrets.DBT_FABRIC_CI_SCHEMA }}
DBT_FABRIC_CI_CLIENT_ID: ${{ secrets.DBT_FABRIC_CI_CLIENT_ID }}
DBT_FABRIC_CI_CLIENT_SECRET: ${{ secrets.DBT_FABRIC_CI_CLIENT_SECRET }}
DBT_FABRIC_CI_TENANT_ID: ${{ secrets.DBT_FABRIC_CI_TENANT_ID }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install ODBC Driver 18 for SQL Server
run: |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
- name: Install dbt-core and Fabric adapter
run: |
python -m pip install --upgrade pip
pip install dbt-core==${{ env.DBT_CORE_VERSION }} dbt-fabric
- name: Install dbt dependencies
run: dbt deps --profiles-dir ./integration_tests/profiles/fabric
- name: Test connection
run: dbt debug --profiles-dir ./integration_tests/profiles/fabric
- name: Build dbt models (full-refresh)
run: |
dbt build --full-refresh --profiles-dir ./integration_tests/profiles/fabric