-
Notifications
You must be signed in to change notification settings - Fork 15
79 lines (67 loc) · 2.63 KB
/
run_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
70
71
72
73
74
75
76
77
78
79
name: run-dbt-test
on:
workflow_dispatch:
inputs:
connector:
description: "Connector to run dbt tests"
required: true
schema:
description: "Schema to run dbt tests"
required: true
jobs:
run-dbt-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: checkout
uses: actions/checkout@v2
- name: Install the project dependencies
run: poetry install
- name: Ensure .dbt directory exists
run: mkdir -p ~/.dbt
- name: Copy profiles
run: cp .github/ci/sample.profiles.yml ~/.dbt/profiles.yml
# - name: Get what connector we are testing
# id: get_connector
# run: echo "::set-output name=connector::source_zendesk_support"
- name: Run Integration Tests for Postgres
working-directory: connectors/${{ inputs.connector }}/integration_tests
if: always()
env:
POSTGRES_DBT_HOST: ${{ secrets.POSTGRES_DBT_HOST }}
POSTGRES_DBT_USER: ${{ secrets.POSTGRES_DBT_USER }}
POSTGRES_DBT_PASSWORD: ${{ secrets.POSTGRES_DBT_PASSWORD }}
POSTGRES_DBT_DBNAME: ${{ secrets.POSTGRES_DBT_DBNAME }}
POSTGRES_DBT_SCHEMA: ${{ inputs.schema }}
run: |
poetry run dbt deps
poetry run dbt run --target postgres --full-refresh
- name: Run Integration Tests for Snowflake
if: always()
working-directory: connectors/${{ inputs.connector }}/integration_tests
env:
SNOWFLAKE_DBT_ACCOUNT: ${{ secrets.SNOWFLAKE_DBT_ACCOUNT }}
SNOWFLAKE_DBT_USER: ${{ secrets.SNOWFLAKE_DBT_USER }}
SNOWFLAKE_DBT_PASSWORD: ${{ secrets.SNOWFLAKE_DBT_PASSWORD }}
SNOWFLAKE_DBT_ROLE: ${{ secrets.SNOWFLAKE_DBT_DATABASE }}
SNOWFLAKE_DBT_WAREHOUSE: ${{ secrets.SNOWFLAKE_DBT_WAREHOUSE }}
SNOWFLAKE_DBT_SCHEMA: ${{ inputs.schema }}
run: |
poetry run dbt deps
poetry run dbt run --target snowflake --full-refresh
- name: Run Integration Tests for BigQuery
if: always()
working-directory: connectors/${{ inputs.connector }}/integration_tests
env:
BIGQUERY_DBT_PROJECT: ${{ secrets.BIGQUERY_DBT_PROJECT }}
BIGQUERY_DBT_DATASET: ${{ secrets.BIGQUERY_DBT_DATASET }}
GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }}
run: |
poetry run dbt deps
poetry run dbt run --target bigquery --full-refresh