Skip to content

Update run_integration_tests.yml #28

Update run_integration_tests.yml

Update run_integration_tests.yml #28

name: run-dbt-test
on:
workflow_dispatch:
inputs:
connector:
description: "Connector 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: Get what connector we are testing
id: connector_name
uses: peter-evans/create-or-update-comment@v4
run: |
connector_name=${{ github.event.client_payload.slash_command.args.named.connector }}
if [[ -z "$connector_name" ]]; then connector_name="not_found"; fi
echo "connector_name=$connector_name" >> $GITHUB_OUTPUT
- name: Run Integration Tests for Postgres
working-directory: connectors/${{ steps.connector_name.outputs.connector }}/integration_tests
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 }}
CONNECTOR_NAME: airbyte_dbt_zendesk_support
run: |
poetry run dbt deps
poetry run dbt run --target postgres --full-refresh