Skip to content

Commit

Permalink
Add postgres test logic separation and call existing workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
VersusFacit committed Mar 20, 2024
1 parent d7db014 commit ef46cee
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/internal-archive-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
run-integration-tests:
runs-on: ubuntu-latest
needs: [job-setup]
if: contains(fromJSON('["redshift"]'), inputs.dbms_name)

env:
TOXENV: integration
Expand All @@ -122,7 +123,6 @@ jobs:
ref: ${{ inputs.sha || 'main' }}

- name: "Setup Environment Variables - ./scripts/env-setup.sh"
if: contains(fromJSON('["redshift"]'), inputs.dbms_name)
run: source ./scripts/env-setup.sh

- name: "Setup Environment Variables - Secrets Context"
Expand Down Expand Up @@ -157,37 +157,34 @@ jobs:
with:
python-version: ${{ env.PYTHON_TARGET_VERSION }}

###################
# Testing with Tox
###################
- name: "Install Python Dependencies"
if: contains(fromJSON('["redshift"]'), inputs.dbms_name)
run: |
python -m pip install --user --upgrade pip
python -m pip --version
python -m pip install tox
tox --version
- name: "Run Tests using tox"
if: contains(fromJSON('["redshift"]'), inputs.dbms_name)
run: tox

#####################
# Testing with Hatch
#####################

- name: "Setup `hatch`"
if: contains(fromJSON('["postgres"]'), inputs.dbms_name)
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
run-integration-tests-hatch:
name: 'Integration Tests (Hatch)'
runs-on: ubuntu-latest
needs: [job-setup]
if: contains(fromJSON('["postgres"]'), inputs.dbms_name)

uses: "dbt-labs/dbt-postgres/.github/workflows/integration-tests.yml"

with:
core_branch: "main"
dbt_adapters_branch: "main"

- name: "Run Tests using hatch"
if: contains(fromJSON('["postgres"]'), inputs.dbms_name)
run: hatch run integration-tests:all

create-internal-release:
name: Create release for internal archive
runs-on: ubuntu-latest
needs: [run-unit-tests, run-integration-tests]
needs: [run-unit-tests, run-integration-tests, run-integration-tests-hatch]

steps:
- name: "Checkout provided sha, default to branch main"
Expand Down

0 comments on commit ef46cee

Please sign in to comment.