forked from emilieschario/jaffle_shop
-
Notifications
You must be signed in to change notification settings - Fork 13
/
dbt_pull_request_job.yml
38 lines (34 loc) · 1.11 KB
/
dbt_pull_request_job.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
name: dbt operations
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
#TODO(developer): update PROJECT_ID
PROJECT_ID: "dbt-demo-386220"
DBT_PROFILES_DIR: ./
GOOGLE_APPLICATION_CREDENTIALS: ./service_account.json
jobs:
dbt:
name: dbt
runs-on: ubuntu-latest
steps:
# setup dbt configs
- uses: actions/checkout@master
- uses: actions/setup-python@v1
with:
python-version: "3.8.x"
- run: pip3 install -r ./requirements.txt
- run: dbt --version
- run: 'echo "$KEYFILE" > ./service_account.json' # persist file in root dir
shell: bash
env:
KEYFILE: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS}} # add a github secret
# run actual dbt commands
- run: dbt debug --target service_account_runs
- run: dbt seed --full-refresh --show --target service_account_runs
- run: dbt source snapshot-freshness --target service_account_runs
- run: dbt run --target service_account_runs
- run: dbt test --target service_account_runs
- run: dbt snapshot --target service_account_runs