added bigquery support #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test DBT package | |
on: | |
push: | |
branches: [ "main", "develop" ] | |
permissions: | |
contents: read | |
defaults: | |
run: | |
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-bigquery: | |
name: Test on BigQuery | |
runs-on: ubuntu-latest | |
container: | |
image: python:3.11 | |
env: | |
DBT_TARGET: bigquery | |
steps: | |
- uses: actions/checkout@v4 | |
- name: create-json | |
id: create-json | |
uses: jsdaniell/create-json@1.1.2 | |
with: | |
name: "integration_tests/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} | |
- name: Install DBT deps | |
run: dbt deps --target ${DBT_TARGET} | |
- name: load test data | |
run: dbt seed --target ${DBT_TARGET} -s users | |
- name: Create seed tests | |
run: | | |
dbt compile --target ${DBT_TARGET} -q \ | |
--inline "{{ testgen.get_test_suggestions(ref('users'), resource_type='seeds', column_config={'quote': true, 'tags': ['dataset-users']} ) }}" \ | |
> seeds/users_test_suggestions.yml | |
- name: dbt test | |
run: dbt test --target ${DBT_TARGET} -s tag:dataset-users | |