-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (54 loc) · 2 KB
/
integration_tests.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
62
63
64
65
66
67
68
69
name: Integration Tests, CI
on:
pull_request:
types:
- opened
- synchronize
branches:
- main
env:
DBT_DEFAULT_TARGET: databricks
DBT_PROFILES_DIR: ${{ github.workspace }}/integration_tests
DBT_PROJECT_DIR: ${{ github.workspace }}/integration_tests
SNOWFLAKE_TEST_ACCOUNT: ${{ secrets.SNOWFLAKE_TEST_ACCOUNT }}
SNOWFLAKE_TEST_USER: ${{ secrets.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 }}
DATABRICKS_TEST_HOST: ${{ secrets.DATABRICKS_TEST_HOST }}
DATABRICKS_TEST_HTTP_PATH: ${{ secrets.DATABRICKS_HTTP_PATH }}
DATABRICKS_TEST_TOKEN: ${{ secrets.DATABRICKS_TEST_TOKEN }}
DATABRICKS_TEST_CATALOG: ${{ vars.DATABRICKS_TEST_CATALOG }}
DATABRICKS_TEST_SCHEMA: ${{ vars.DATABRICKS_TEST_SCHEMA }}
jobs:
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
cd integration_tests/
python -m pip install --upgrade pip
pip install -r requirements.txt
dbt deps
- name: Integration Test - Snowflake
run: |
dbt test -s source:* --target snowflake
dbt build --target snowflake --vars "
databricks_billing_database: $SNOWFLAKE_TEST_DATABASE
databricks_billing_schema: $SNOWFLAKE_TEST_SCHEMA
"
- name: Integration Test - Databricks
run: |
dbt seed --target snowflake
dbt test -s source:* --target snowflake
dbt build --exclude-resource-type seed --target databricks --vars "
databricks_billing_database: $DATABRICKS_TEST_CATALOG
databricks_billing_schema: $DATABRICKS_TEST_SCHEMA
"