From 2fc1c020fed29ceb6574b477b1bd0bdc49bca8d2 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 12 Jun 2024 17:58:18 -0400 Subject: [PATCH] use full install instead of editable install --- .github/workflows/integration-tests.yml | 41 ++++++++++++++++++------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 60918c5b..96a2a06b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -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