Skip to content

Commit

Permalink
add integration test for psycopg2 in build deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Apr 12, 2024
1 parent a2c2fec commit 22497b4
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
integration:
name: Integration Tests
Expand Down Expand Up @@ -68,14 +72,12 @@ jobs:

- name: Update Adapters and Core branches
if: ${{ github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch'}}
shell: bash
run: |
./.github/scripts/update_dev_packages.sh \
${{ inputs.dbt_adapters_branch }} \
${{ inputs.core_branch }}
- name: Setup postgres
shell: bash
run: psql -f ./scripts/setup_test_database.sql
env:
PGHOST: localhost
Expand Down Expand Up @@ -106,3 +108,24 @@ jobs:
source-file: "results.csv"
file-name: "integration_results"
python-version: ${{ matrix.python-version }}

psycopg2-version:
name: "Test psycopg2 build version"
runs-on: ${{ matrix.scenario.platform }}
strategy:
matrix:
scenario:
- {platform: ubuntu-latest, psycopg2-name: pscyopg2}
- {platform: macos-latest, psycopg2-name: pscyopg2-binary}
steps:
- name: "Check out repository"
uses: actions/checkout@v4

- name: "Test psycopg2 name"
run: |
python -m pip install .
PSYCOPG2_PIP_ENTRY=$(pip list | grep "psycopg2 " || pip list | grep psycopg2-binary)
PSYCOPG2_NAME="${PSYCOPG2_PIP_ENTRY%% *}"
if [[ ${{ PSYCOPG2_NAME != matrix.scenario.psycopg2-name }} ]]; then
exit 1
fi

0 comments on commit 22497b4

Please sign in to comment.