From f86d9d5169ba5b634182d569e4a395eee87db876 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 5 Jun 2024 20:58:13 -0400 Subject: [PATCH] replace script with inline execution --- .github/scripts/check_psycopg2_install.sh | 10 ------- .github/workflows/integration-tests.yml | 36 +++++++++++++++++++++-- 2 files changed, 33 insertions(+), 13 deletions(-) delete mode 100644 .github/scripts/check_psycopg2_install.sh diff --git a/.github/scripts/check_psycopg2_install.sh b/.github/scripts/check_psycopg2_install.sh deleted file mode 100644 index 5d96a16e..00000000 --- a/.github/scripts/check_psycopg2_install.sh +++ /dev/null @@ -1,10 +0,0 @@ -python -m pip install . -PSYCOPG2_PIP_ENTRY=$(pip list | grep "psycopg2 " || pip list | grep psycopg2-binary) - -echo $PSYCOPG2_PIP_ENTRY -PSYCOPG2_NAME="${PSYCOPG2_PIP_ENTRY%% *}" -echo $PSYCOPG2_NAME - -if [[ "${PSYCOPG2_NAME}" != "${PSYCOPG2_EXPECTED_NAME}" ]]; then - exit 1 -fi diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 54574a80..fff13886 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -114,18 +114,48 @@ jobs: uses: actions/checkout@v4 - name: "Test psycopg2 name - default" - run: ./.github/scripts/check_psycopg2_install.sh + run: | + python -m pip install . + PSYCOPG2_PIP_ENTRY=$(pip list | grep "psycopg2 " || pip list | grep psycopg2-binary) + + echo $PSYCOPG2_PIP_ENTRY + PSYCOPG2_NAME="${PSYCOPG2_PIP_ENTRY%% *}" + echo $PSYCOPG2_NAME + + if [[ "${PSYCOPG2_NAME}" != "${PSYCOPG2_EXPECTED_NAME}" ]]; then + exit 1 + fi env: PSYCOPG2_EXPECTED_NAME: psycopg2-binary - name: "Test psycopg2 name - override" - run: ./.github/scripts/check_psycopg2_install.sh + run: | + python -m pip install . + PSYCOPG2_PIP_ENTRY=$(pip list | grep "psycopg2 " || pip list | grep psycopg2-binary) + + echo $PSYCOPG2_PIP_ENTRY + PSYCOPG2_NAME="${PSYCOPG2_PIP_ENTRY%% *}" + echo $PSYCOPG2_NAME + + if [[ "${PSYCOPG2_NAME}" != "${PSYCOPG2_EXPECTED_NAME}" ]]; then + exit 1 + fi env: DBT_PSYCOPG2_NAME: psycopg2 PSYCOPG2_EXPECTED_NAME: psycopg2 - name: "Test psycopg2 name - invalide override" - run: ./.github/scripts/check_psycopg2_install.sh + run: | + python -m pip install . + PSYCOPG2_PIP_ENTRY=$(pip list | grep "psycopg2 " || pip list | grep psycopg2-binary) + + echo $PSYCOPG2_PIP_ENTRY + PSYCOPG2_NAME="${PSYCOPG2_PIP_ENTRY%% *}" + echo $PSYCOPG2_NAME + + if [[ "${PSYCOPG2_NAME}" != "${PSYCOPG2_EXPECTED_NAME}" ]]; then + exit 1 + fi env: DBT_PSYCOPG2_NAME: rubber-baby-buggy-bumpers PSYCOPG2_EXPECTED_NAME: psycopg2-binary