Skip to content

Commit

Permalink
use hatch run instead of pip install
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Jun 6, 2024
1 parent f86d9d5 commit 9854f22
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ jobs:
- name: "Check out repository"
uses: actions/checkout@v4

- name: Setup `hatch`
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main

- name: "Test psycopg2 name - default"
run: |
python -m pip install .
PSYCOPG2_PIP_ENTRY=$(pip list | grep "psycopg2 " || pip list | grep psycopg2-binary)
PSYCOPG2_PIP_ENTRY=$(hatch run pip list | grep "psycopg2 " || hatch run pip list | grep psycopg2-binary)
echo $PSYCOPG2_PIP_ENTRY
PSYCOPG2_NAME="${PSYCOPG2_PIP_ENTRY%% *}"
Expand All @@ -128,10 +130,9 @@ jobs:
env:
PSYCOPG2_EXPECTED_NAME: psycopg2-binary

- name: "Test psycopg2 name - override"
- name: "Test psycopg2 name - invalide override"
run: |
python -m pip install .
PSYCOPG2_PIP_ENTRY=$(pip list | grep "psycopg2 " || pip list | grep psycopg2-binary)
PSYCOPG2_PIP_ENTRY=$(hatch run pip list | grep "psycopg2 " || hatch run pip list | grep psycopg2-binary)
echo $PSYCOPG2_PIP_ENTRY
PSYCOPG2_NAME="${PSYCOPG2_PIP_ENTRY%% *}"
Expand All @@ -141,13 +142,12 @@ jobs:
exit 1
fi
env:
DBT_PSYCOPG2_NAME: psycopg2
PSYCOPG2_EXPECTED_NAME: psycopg2
DBT_PSYCOPG2_NAME: rubber-baby-buggy-bumpers
PSYCOPG2_EXPECTED_NAME: psycopg2-binary

- name: "Test psycopg2 name - invalide override"
- name: "Test psycopg2 name - override"
run: |
python -m pip install .
PSYCOPG2_PIP_ENTRY=$(pip list | grep "psycopg2 " || pip list | grep psycopg2-binary)
PSYCOPG2_PIP_ENTRY=$(hatch run pip list | grep "psycopg2 " || hatch run pip list | grep psycopg2-binary)
echo $PSYCOPG2_PIP_ENTRY
PSYCOPG2_NAME="${PSYCOPG2_PIP_ENTRY%% *}"
Expand All @@ -157,5 +157,5 @@ jobs:
exit 1
fi
env:
DBT_PSYCOPG2_NAME: rubber-baby-buggy-bumpers
PSYCOPG2_EXPECTED_NAME: psycopg2-binary
DBT_PSYCOPG2_NAME: psycopg2
PSYCOPG2_EXPECTED_NAME: psycopg2

0 comments on commit 9854f22

Please sign in to comment.