Skip to content

Commit

Permalink
added dbt checks to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
laysabit committed Sep 11, 2024
1 parent c3f590b commit 523df55
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/dbt-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
pull_request:
types:
- opened
- synchronize
branches:
- main

env:
DATABRICKS_TEST_CATALOG: ${{ vars.DATABRICKS_TEST_CATALOG }}
DATABRICKS_TEST_SCHEMA: ${{ vars.DATABRICKS_TEST_SCHEMA }}
DATABRICKS_TEST_HOST: ${{ vars.DATABRICKS_TEST_HOST }}
DATABRICKS_TEST_HTTP_PATH: ${{ vars.DATABRICKS_TEST_HTTP_PATH }}
DATABRICKS_TEST_TOKEN: ${{ secrets.DATABRICKS_TEST_TOKEN }}

SNOWFLAKE_TEST_ACCOUNT: ${{ vars.SNOWFLAKE_TEST_ACCOUNT }}
SNOWFLAKE_TEST_USER: ${{ vars.SNOWFLAKE_TEST_USER }}
SNOWFLAKE_TEST_PASSWORD: ${{ secrets.SNOWFLAKE_TEST_PASSWORD }}
SNOWFLAKE_TEST_ROLE: ${{ vars.SNOWFLAKE_TEST_ROLE }}
SNOWFLAKE_TEST_DATABASE: ${{ vars.SNOWFLAKE_TEST_DATABASE }}
SNOWFLAKE_TEST_WAREHOUSE: ${{ vars.SNOWFLAKE_TEST_WAREHOUSE }}
SNOWFLAKE_TEST_SCHEMA: ${{ vars.SNOWFLAKE_TEST_SCHEMA }}


jobs:
dbt-checks:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Authenticate to GCP
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.BIGQUERY_AUTH }}"

- name: Run dbt debug for Databricks
run: dbt debug --target databricks

- name: Run dbt debug for Snowflake
run: dbt debug --target snowflake

- name: dbt deps
run: dbt deps

- name: dbt compile
run: dbt compile

0 comments on commit 523df55

Please sign in to comment.