-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (60 loc) · 2.6 KB
/
dbt_artifact_probes.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
name: dbt artifacts probe
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
env:
DBT_PROFILES_DIR: dbt_project
DBT_PROJECT_DIR: dbt_project
POETRY_VERSION: "1.8.3"
POETRY_VIRTUALENVS_IN_PROJECT: true
jobs:
dbt-cloud:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Determine python version
id: python-version
run: |
export PYTHON_VERSION=$(cat .python-version)
echo "PYTHON_VERSION: $PYTHON_VERSION"
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_OUTPUT
- name: Setup Python
uses: ./.github/actions/setup_python_env
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ steps.python-version.outputs.PYTHON_VERSION }}
- name: Trigger dbt Cloud job and download artifacts
run: ./scripts/get_dbt_cloud_artifacts.sh
env:
DBT_ACCOUNT_ID: ${{ secrets.DBT_ACCOUNT_ID }}
DBT_CLOUD_JOB_ID: ${{ secrets.DBT_CLOUD_JOB_ID }}
DBT_TOKEN_VALUE: ${{ secrets.DBT_TOKEN_VALUE }}
- name: Run `dbt-bouncer`
run: poetry run dbt-bouncer --config-file ./dbt-bouncer-example.yml
dbt-core:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Determine python version
id: python-version
run: |
export PYTHON_VERSION=$(cat .python-version)
echo "PYTHON_VERSION: $PYTHON_VERSION"
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_OUTPUT
- name: Setup Python
uses: ./.github/actions/setup_python_env
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ steps.python-version.outputs.PYTHON_VERSION }}
- name: Install latest released dbt-core
run: poetry run pip install dbt-core -U
- name: Regenerate dbt artifacts and run `dbt-bouncer`
run: |
poetry run dbt deps
poetry run dbt build
poetry run dbt docs generate
poetry run dbt-bouncer --config-file ./dbt-bouncer-example.yml