-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (52 loc) · 1.77 KB
/
ci-check.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
name: ci check
on:
pull_request:
# Automatically cancel any previous runs of this workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci-checks:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./integration_tests
env:
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
SNOWFLAKE_USER_CI: ${{ secrets.SNOWFLAKE_CI_USER }}
SNOWFLAKE_PASSWORD_CI: ${{ secrets.SNOWFLAKE_CI_USER_PASSWORD }}
SNOWFLAKE_DATABASE_CI: ${{ secrets.SNOWFLAKE_CI_DATABASE }}
SNOWFLAKE_ROLE_CI: ${{ secrets.SNOWFLAKE_CI_ROLE }}
SNOWFLAKE_WAREHOUSE_CI: ${{ secrets.SNOWFLAKE_CI_WAREHOUSE }}
SNOWFLAKE_SCHEMA_CI: DBT_CI_${{github.event.number}}_${{ github.actor }} # Creates a unique schema for each PR
steps:
- name: Checkout branch
id: checkout-branch
uses: actions/checkout@v3
- name: Install Poetry
id: install-poetry
run: |
pipx install poetry
- name: setup-python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'poetry' # Auto cache based on poetry.lock
- name: Install python deps
id: install-python-deps
run: |
poetry install
- name: Install dbt deps
id: install-dbt-deps
run: |
poetry run dbt deps
- name: Check dbt compiles and CI Profiles work
id: check-dbt-compiles-and-ci-profiles-work
run: |
poetry run dbt compile --target snowflake-ci
poetry run dbt debug --target snowflake-ci
- name: dbt build on Snowflake
id: dbt-build-snowflake
run: |
potery run dbt build --full-refresh --target snowflake-ci