Skip to content

Commit

Permalink
use full install instead of editable install
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Jun 12, 2024
1 parent cc891c0 commit 2fc1c02
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,53 +119,72 @@ jobs:

- name: "Test psycopg2 name - default"
run: |
hatch env prune
PSYCOPG2_NAME=$((hatch run pip show psycopg2 || hatch run pip show psycopg2-binary) | grep Name | cut -d " " -f 2)
python -m venv venv
./venv/bin/activate
python -m pip install .
PSYCOPG2_NAME=$((pip show psycopg2 || pip show psycopg2-binary) | grep Name | cut -d " " -f 2)
if [[ "$PSYCOPG2_NAME" != "$PSYCOPG2_EXPECTED_NAME" ]]; then
exit 1
fi
deactivate
rmdir -r ./venv
env:
PSYCOPG2_EXPECTED_NAME: psycopg2-binary

- name: "Test psycopg2 name - invalid override"
run: |
hatch env prune
PSYCOPG2_NAME=$((hatch run pip show psycopg2 || hatch run pip show psycopg2-binary) | grep Name | cut -d " " -f 2)
python -m venv venv
./venv/bin/activate
python -m pip install .
PSYCOPG2_NAME=$((pip show psycopg2 || pip show psycopg2-binary) | grep Name | cut -d " " -f 2)
if [[ "$PSYCOPG2_NAME" != "$PSYCOPG2_EXPECTED_NAME" ]]; then
exit 1
fi
deactivate
rmdir -r ./venv
env:
DBT_PSYCOPG2_NAME: rubber-baby-buggy-bumpers
PSYCOPG2_EXPECTED_NAME: psycopg2-binary

- name: "Test psycopg2 name - override"
run: |
hatch env prune
PSYCOPG2_NAME=$((hatch run pip show psycopg2 || hatch run pip show psycopg2-binary) | grep Name | cut -d " " -f 2)
python -m venv venv
./venv/bin/activate
python -m pip install .
PSYCOPG2_NAME=$((hatch run pip show psycopg2 || hatch run pip show psycopg2-binary) | grep Name | cut -d " " -f 2)
if [[ "$PSYCOPG2_NAME" != "$PSYCOPG2_EXPECTED_NAME" ]]; then
exit 1
fi
deactivate
rmdir -r ./venv
env:
DBT_PSYCOPG2_NAME: psycopg2
PSYCOPG2_EXPECTED_NAME: psycopg2

- name: "Test psycopg2 name - manual override"
run: |
hatch env prune
python -m venv venv
./venv/bin/activate
python -m pip install .
# this is the work around
PSYCOPG2_VERSION=$(hatch run pip show psycopg2-binary | grep Version | cut -d " " -f 2)
hatch run pip uninstall -y psycopg2-binary
hatch run pip install psycopg2==$PSYCOPG2_VERSION
PSYCOPG2_VERSION=$(pip show psycopg2-binary | grep Version | cut -d " " -f 2)
pip uninstall -y psycopg2-binary
pip install psycopg2==$PSYCOPG2_VERSION
# this is the end of the work around
PSYCOPG2_NAME=$((hatch run pip show psycopg2 || hatch run pip show psycopg2-binary) | grep Name | cut -d " " -f 2)
if [[ "$PSYCOPG2_NAME" != "$PSYCOPG2_EXPECTED_NAME" ]]; then
exit 1
fi
deactivate
rmdir -r ./venv
env:
PSYCOPG2_EXPECTED_NAME: psycopg2

0 comments on commit 2fc1c02

Please sign in to comment.