Skip to content

Commit

Permalink
added bigquery support
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin committed Jan 3, 2024
1 parent 5ae1337 commit 27d38f6
Showing 1 changed file with 128 additions and 121 deletions.
249 changes: 128 additions & 121 deletions .github/workflows/dbt_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,126 +12,126 @@ defaults:
working-directory: integration_tests

jobs:
test-duckdb:
name: Test on DuckDB
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

env:
DBT_TARGET: duckdb

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: pip install
run: pip install dbt-core duckdb dbt-${DBT_TARGET}

- name: Install DBT deps
run: dbt deps --target ${DBT_TARGET}
- name: load test data
run: dbt seed --target ${DBT_TARGET}

- name: Create seed tests
run: bash tests/create_seeds_tests_yml.sh

- name: dbt test
run: dbt test --target ${DBT_TARGET}

test-postgres:
name: Test on Postgres
runs-on: ubuntu-latest
container:
image: python:3.11

services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres

env:
DBT_TARGET: postgres

steps:
- uses: actions/checkout@v4

- name: pip install
run: pip install dbt-core dbt-${DBT_TARGET}

- name: Install DBT deps
run: dbt deps --target ${DBT_TARGET}
- name: load test data
run: dbt seed --target ${DBT_TARGET}

- name: Create seed tests
run: bash tests/create_seeds_tests_yml.sh

- name: dbt test
run: dbt test --target ${DBT_TARGET}

test-snowflake:
name: Test on Snowflake
runs-on: ubuntu-latest
container:
image: python:3.11

env:
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
DBT_TARGET: snowflake

steps:
- uses: actions/checkout@v4

- name: pip install
run: pip install dbt-core dbt-${DBT_TARGET}

- name: Install DBT deps
run: dbt deps --target ${DBT_TARGET}
- name: load test data
run: dbt seed --target ${DBT_TARGET}

- name: Create seed tests
run: bash tests/create_seeds_tests_yml.sh

- name: dbt test
run: dbt test --target ${DBT_TARGET}

test-redshift:
name: Test on RedShift
runs-on: ubuntu-latest
container:
image: python:3.11

env:
REDSHIFT_PASSWORD: ${{ secrets.REDSHIFT_PASSWORD }}
DBT_TARGET: redshift

steps:
- uses: actions/checkout@v4

- name: pip install
run: pip install dbt-core dbt-${DBT_TARGET}

- name: Install DBT deps
run: dbt deps --target ${DBT_TARGET}
- name: load test data
run: dbt seed --target ${DBT_TARGET}

- name: Create seed tests
run: bash tests/create_seeds_tests_yml.sh

- name: dbt test
run: dbt test --target ${DBT_TARGET}
# test-duckdb:
# name: Test on DuckDB
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.8", "3.9", "3.10", "3.11"]
#
# env:
# DBT_TARGET: duckdb
#
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
#
# - name: pip install
# run: pip install dbt-core duckdb dbt-${DBT_TARGET}
#
# - name: Install DBT deps
# run: dbt deps --target ${DBT_TARGET}
#
# - name: load test data
# run: dbt seed --target ${DBT_TARGET}
#
# - name: Create seed tests
# run: bash tests/create_seeds_tests_yml.sh
#
# - name: dbt test
# run: dbt test --target ${DBT_TARGET}
#
# test-postgres:
# name: Test on Postgres
# runs-on: ubuntu-latest
# container:
# image: python:3.11
#
# services:
# postgres:
# image: postgres
# env:
# POSTGRES_PASSWORD: postgres
#
# env:
# DBT_TARGET: postgres
#
# steps:
# - uses: actions/checkout@v4
#
# - name: pip install
# run: pip install dbt-core dbt-${DBT_TARGET}
#
# - name: Install DBT deps
# run: dbt deps --target ${DBT_TARGET}
#
# - name: load test data
# run: dbt seed --target ${DBT_TARGET}
#
# - name: Create seed tests
# run: bash tests/create_seeds_tests_yml.sh
#
# - name: dbt test
# run: dbt test --target ${DBT_TARGET}
#
# test-snowflake:
# name: Test on Snowflake
# runs-on: ubuntu-latest
# container:
# image: python:3.11
#
# env:
# SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
# DBT_TARGET: snowflake
#
# steps:
# - uses: actions/checkout@v4
#
# - name: pip install
# run: pip install dbt-core dbt-${DBT_TARGET}
#
# - name: Install DBT deps
# run: dbt deps --target ${DBT_TARGET}
#
# - name: load test data
# run: dbt seed --target ${DBT_TARGET}
#
# - name: Create seed tests
# run: bash tests/create_seeds_tests_yml.sh
#
# - name: dbt test
# run: dbt test --target ${DBT_TARGET}
#
# test-redshift:
# name: Test on RedShift
# runs-on: ubuntu-latest
# container:
# image: python:3.11
#
# env:
# REDSHIFT_PASSWORD: ${{ secrets.REDSHIFT_PASSWORD }}
# DBT_TARGET: redshift
#
# steps:
# - uses: actions/checkout@v4
#
# - name: pip install
# run: pip install dbt-core dbt-${DBT_TARGET}
#
# - name: Install DBT deps
# run: dbt deps --target ${DBT_TARGET}
#
# - name: load test data
# run: dbt seed --target ${DBT_TARGET}
#
# - name: Create seed tests
# run: bash tests/create_seeds_tests_yml.sh
#
# - name: dbt test
# run: dbt test --target ${DBT_TARGET}

test-bigquery:
name: Test on BigQuery
Expand All @@ -145,7 +145,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: echo '${{ secrets.GCP_KEYFILE }}' > gcp_keyfile.json
- name: create-json
id: create-json
uses: jsdaniell/create-json@1.1.2
with:
name: "gcp_keyfile.json"
json: ${{ secrets.GCP_KEYFILE }}

#- run: echo '${{ secrets.GCP_KEYFILE }}' > gcp_keyfile.json

- name: pip install
run: pip install dbt-core dbt-${DBT_TARGET}
Expand Down

0 comments on commit 27d38f6

Please sign in to comment.