Skip to content

Commit

Permalink
Combine job to stop the bleeding.
Browse files Browse the repository at this point in the history
  • Loading branch information
VersusFacit committed Mar 23, 2024
1 parent cce6b13 commit f8d79db
Showing 1 changed file with 12 additions and 26 deletions.
38 changes: 12 additions & 26 deletions .github/workflows/internal-archive-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,9 @@ jobs:
####################

run-integration-tests:
name: 'Integration Tests (Tox)'
name: 'Integration Tests'
runs-on: ubuntu-latest
needs: [env-var-setup, job-setup]
if: "${{ needs.env-var-setup.outputs.is_hatch_adapter == 'false' }}"

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

- name: "Setup Environment Variables - ./scripts/env-setup.sh"
if: "${{ needs.env-var-setup.outputs.is_hatch_adapter == 'false' }}"
run: |
if [ -f './scripts/env-setup.sh' ]; then
source ./scripts/env-setup.sh
Expand Down Expand Up @@ -209,30 +209,29 @@ jobs:


- name: "Set up Python - ${{ env.PYTHON_TARGET_VERSION }}"
if: "${{ needs.env-var-setup.outputs.is_hatch_adapter == 'false' }}"
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_TARGET_VERSION }}

- name: "Install Python Dependencies"
if: "${{ needs.env-var-setup.outputs.is_hatch_adapter == 'false' }}"
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: "${{ needs.env-var-setup.outputs.is_hatch_adapter == 'false' }}"
run: tox


run-integration-tests-hatch:
name: 'Integration Tests (Hatch)'
needs: [env-var-setup, job-setup]
if: "${{ needs.env-var-setup.outputs.is_hatch_adapter == 'true' }}"

uses: "dbt-labs/dbt-postgres/.github/workflows/integration-tests.yml@main"
with:
core_branch: "main"
dbt_adapters_branch: "main"
- name: 'Integration Tests (Hatch)'
if: "${{ needs.env-var-setup.outputs.is_hatch_adapter == 'true' }}"
uses: "dbt-labs/dbt-postgres/.github/workflows/integration-tests.yml@main"
with:
core_branch: "main"
dbt_adapters_branch: "main"


####################
Expand All @@ -242,20 +241,7 @@ jobs:
create-internal-release:
name: Create release for internal archive
runs-on: ubuntu-latest
needs: [env-var-setup, run-unit-tests, run-integration-tests, run-integration-tests-hatch]
# Build artifact if
# 1. Spark invoked (it runs tests via its in-repo workflow)
# 2. Integration tests passed at least via one job above
# if: |
# (needs.env-var-setup.outputs.is_spark_build == 'true') ||
# (needs.run-integration-tests.result == 'success' || needs.run-integration-tests-hatch.result == 'success')

steps:
- name: Debug output
run: |
echo "is_spark_build: ${{ needs.env-var-setup.outputs.is_spark_build }}"
echo "run-integration-tests result: ${{ needs.run-integration-tests.result }}"
echo "run-integration-tests-hatch result: ${{ needs.run-integration-tests-hatch.result }}"
needs: [env-var-setup, run-unit-tests, run-integration-tests]

- name: "Checkout provided sha, default to branch main"
uses: actions/checkout@v4
Expand Down

0 comments on commit f8d79db

Please sign in to comment.