diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index c3f0a70..4d73016 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -29,7 +29,6 @@ concurrency: defaults: run: shell: bash - working-directory: ./dbt-postgres jobs: code-quality: @@ -45,9 +44,11 @@ jobs: - name: Update Adapters and Core branches if: ${{ contains(github.event_name, 'workflow_') }} run: scripts/update_dev_packages.sh ${{ inputs.dbt_adapters_branch }} "main" + working-directory: ./dbt-postgres - name: Setup `hatch` uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main - name: Run code quality run: hatch run code-quality + working-directory: ./dbt-postgres diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 1dfbcbe..8e1c20c 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -117,9 +117,11 @@ jobs: ${{ inputs.dbt_core_branch }} \ ${{ inputs.dbt_common_branch }} cat pyproject.toml + working-directory: ./dbt-postgres - name: Setup postgres run: psql -f ./scripts/setup_test_database.sql + working-directory: ./dbt-postgres env: PGHOST: localhost PGPORT: 5432 @@ -134,6 +136,7 @@ jobs: - name: Run integration tests run: hatch run integration-tests + working-directory: ./dbt-postgres env: POSTGRES_TEST_HOST: localhost POSTGRES_TEST_PORT: 5432 @@ -166,17 +169,20 @@ jobs: - name: "Test psycopg2 name - default" run: scripts/psycopg2-check.sh + working-directory: ./dbt-postgres env: PSYCOPG2_EXPECTED_NAME: psycopg2-binary - name: "Test psycopg2 name - invalid override" run: scripts/psycopg2-check.sh + working-directory: ./dbt-postgres env: DBT_PSYCOPG2_NAME: rubber-baby-buggy-bumpers PSYCOPG2_EXPECTED_NAME: psycopg2-binary - name: "Test psycopg2 name - override" run: scripts/psycopg2-check.sh + working-directory: ./dbt-postgres env: DBT_PSYCOPG2_NAME: psycopg2 PSYCOPG2_EXPECTED_NAME: psycopg2-binary # we have not implemented the hook yet, so this doesn't work @@ -184,6 +190,7 @@ jobs: - name: "Test psycopg2 name - manual override" # verify that the workaround documented in the `README.md` continues to work run: scripts/psycopg2-check.sh + working-directory: ./dbt-postgres env: PSYCOPG2_WORKAROUND: true PSYCOPG2_EXPECTED_NAME: psycopg2 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index dbd4e73..be1a519 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -15,11 +15,6 @@ 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 - working-directory: ./dbt-postgres - jobs: unit: name: Unit Tests @@ -43,3 +38,5 @@ jobs: - name: Run unit tests run: hatch run unit-tests + shell: bash + working-directory: ./dbt-postgres