Skip to content

Commit

Permalink
Merge pull request #34 from TasmanAnalytics/test/ci-check
Browse files Browse the repository at this point in the history
✅ test CI check
  • Loading branch information
tomshelllby authored Jan 19, 2024
2 parents dfa1128 + 272c73b commit 7fab6ff
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci check
name: CI

on:
pull_request:
Expand All @@ -9,7 +9,7 @@ concurrency:
cancel-in-progress: true

jobs:
ci-checks:
ci-check-snowflake:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -18,9 +18,9 @@ jobs:
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_DATABASE_CI: DBT_MTA_PACKAGE
SNOWFLAKE_ROLE_CI: PACKAGE_CI_ROLE
SNOWFLAKE_WAREHOUSE_CI: PACKAGE_DEV_WH
SNOWFLAKE_SCHEMA_CI: DBT_CI_${{github.event.number}}_${{ github.actor }} # Creates a unique schema for each PR
steps:
- name: Checkout branch
Expand Down Expand Up @@ -50,12 +50,11 @@ jobs:
poetry run dbt deps
- name: Check dbt compiles and CI Profiles work
id: check-dbt-compiles-and-ci-profiles-work
id: check-dbt-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
poetry run dbt build --full-refresh --target snowflake-ci
1 change: 0 additions & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ clean-targets: ["target", "dbt_packages"]
models:
tasman_dbt_mta_integration_tests:


vars:
tasman_dbt_mta:
incremental: "true"
Expand Down
14 changes: 7 additions & 7 deletions integration_tests/profiles.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
tasman_integration_tests:
outputs:
snowflake-ci:
account: xt59823.eu-west-2.aws
account: "{{ env_var('SNOWFLAKE_ACCOUNT') }}"
client_session_keep_alive: true
database: {{ env_var('SNOWFLAKE_DATABASE_CI') }}
user: {{ env_var('SNOWFLAKE_USER_CI') }}
password: {{ env_var('SNOWFLAKE_PASSWORD_CI') }}
role: {{ env_var('SNOWFLAKE_ROLE_CI') }}
schema: {{ env_var('SNOWFLAKE_SCHEMA_CI') }}
warehouse: {{ env_var('SNOWFLAKE_WAREHOUSE_CI') }}
database: "{{ env_var('SNOWFLAKE_DATABASE_CI') }}"
user: "{{ env_var('SNOWFLAKE_USER_CI') }}"
password: "{{ env_var('SNOWFLAKE_PASSWORD_CI') }}"
role: "{{ env_var('SNOWFLAKE_ROLE_CI') }}"
schema: "{{ env_var('SNOWFLAKE_SCHEMA_CI') }}"
warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE_CI') }}"
threads: 12
type: snowflake

0 comments on commit 7fab6ff

Please sign in to comment.