Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurcerqueiraindicium committed Apr 8, 2024
1 parent f55bf7a commit d988d35
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Integration Tests on Databricks Billing

on:
push:
branches:
- feature/add-ci-cd

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd integration_tests
pip install -r requirements.txt
dbt deps
- name: Integration Test - Snowflake
run: cd integration_tests && dbt build --target snowflake
10 changes: 5 additions & 5 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'databricks_billing_integration_tests'
version: '1.0.0'
config-version: 2

profile: 'databricks_billing'
profile: 'integration_tests'

model-paths: ["models"]
analysis-paths: ["analyses"]
Expand All @@ -25,10 +25,10 @@ models:

seeds:
databricks_billing:
+database: database_name
+database: "{{ env_var('SNOWFLAKE_TEST_DATABASE') }}"
+tags: integration_tests
+schema: schema_name
+schema: "{{ env_var('SNOWFLAKE_TEST_SCHEMA') }}"

vars:
databricks_billing_database: database_name
databricks_billing_schema: schema_name
databricks_billing_database: "{{ env_var('SNOWFLAKE_TEST_DATABASE') }}"
databricks_billing_schema: "{{ env_var('SNOWFLAKE_TEST_SCHEMA') }}"
13 changes: 13 additions & 0 deletions integration_tests/profiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
integration_tests:
target: snowflake
outputs:
snowflake:
type: snowflake
account: "{{ env_var('SNOWFLAKE_TEST_ACCOUNT') }}"
user: "{{ env_var('SNOWFLAKE_TEST_USER') }}"
password: "{{ env_secret('SNOWFLAKE_TEST_PASSWORD') }}"
role: "{{ env_var('SNOWFLAKE_TEST_ROLE') }}"
database: "{{ env_var('SNOWFLAKE_TEST_DATABASE') }}"
warehouse: "{{ env_var('SNOWFLAKE_TEST_WAREHOUSE') }}"
schema: "{{ env_var('SNOWFLAKE_TEST_SCHEMA') }}"
threads: 5

0 comments on commit d988d35

Please sign in to comment.