Skip to content

Commit

Permalink
Add postgres testing take 1
Browse files Browse the repository at this point in the history
  • Loading branch information
VersusFacit committed Mar 20, 2024
1 parent 2d7fe4e commit d7db014
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions .github/workflows/internal-archive-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,32 @@ 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 install tox
python -m pip --version
python -m tox --version
- name: "Run Tox"
- 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

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

run-integration-tests:
runs-on: ubuntu-latest
needs: [job-setup]
Expand All @@ -106,8 +121,9 @@ jobs:
with:
ref: ${{ inputs.sha || 'main' }}

# - name: "Setup Environment Variables - ./scripts/env-setup.sh"
# run: source ./scripts/env-setup.sh
- 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"
uses: actions/github-script@v7
Expand Down Expand Up @@ -135,12 +151,17 @@ jobs:
env:
SECRETS_CONTEXT: ${{ toJson(secrets) }}


- name: "Set up Python - ${{ env.PYTHON_TARGET_VERSION }}"
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_TARGET_VERSION }}

- name: "Install python tools"
###################
# 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
Expand All @@ -151,6 +172,18 @@ jobs:
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

- 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
Expand Down Expand Up @@ -219,7 +252,7 @@ jobs:
#
# 2. Build with Hatch
#
- name: Setup `hatch`
- name: "Setup `hatch`"
if: contains(fromJSON('["postgres"]'), inputs.dbms_name)
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main

Expand Down

0 comments on commit d7db014

Please sign in to comment.