Skip to content

move to GitHub Actions #8

move to GitHub Actions

move to GitHub Actions #8

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
environment:
name: ci_testing
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
data-platform: ["snowflake"]
dbt-version: ["1.7"]
# python-version: ["3.9", "3.10", "3.11", "3.12"]
# data-platform: ["redshift", "snowflake","bigquery"]
# dbt-version: ["1.5","1.6", "1.7"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dbt-${{ matrix.data-platform }}~=${{ matrix.dbt-version }}
run: |
python -m pip install --upgrade pip
python -m pip install "dbt-${{ matrix.data-platform }}~=${{ matrix.dbt-version }}.0"
- name: run integration_tests project on ${{ matrix.data-platform }}
run: |
cd integration_tests
export DBT_PROFILES_DIR=.
dbt deps --target ${{ matrix.data-platform }}
dbt seed --full-refresh --target ${{ matrix.data-platform }}
dbt run-operation prep_external --target ${{ matrix.data-platform }}
dbt run-operation dbt_external_tables.stage_external_sources --vars 'ext_full_refresh: true' --target ${{ matrix.data-platform }}
dbt run-operation dbt_external_tables.stage_external_sources --target ${{ matrix.data-platform }}
dbt test --target ${{ matrix.data-platform }}
env:
REDSHIFT_TEST_HOST: ${{ secrets.REDSHIFT_TEST_HOST }}
REDSHIFT_TEST_USER: ${{ secrets.REDSHIFT_TEST_USER }}
REDSHIFT_TEST_PASS: ${{ secrets.REDSHIFT_TEST_PASS }}
REDSHIFT_TEST_PORT: ${{ secrets.REDSHIFT_TEST_PORT }}
REDSHIFT_TEST_DBNAME: ${{ secrets.REDSHIFT_TEST_DBNAME }}