Skip to content

Commit

Permalink
made the is-flaky-tests flag available outside the _integration-tests…
Browse files Browse the repository at this point in the history
… GH workflow
  • Loading branch information
VanTudor committed Jan 17, 2025
1 parent 705e11c commit 2474f38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/_integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
description: "Choose the Python version to test against"
type: string
default: "3.9"
is-flaky-test-run:
description: "What kind of tests to execute in this run (true for flaky tests, false for the rest)"
type: boolean
default: false
workflow_dispatch:
inputs:
package:
Expand All @@ -49,6 +53,10 @@ on:
description: "Choose the Python version to test against"
type: choice
options: ["3.9", "3.10", "3.11", "3.12"]
is-flaky-test-run:
description: "What kind of tests to execute in this run (true for flaky tests, false for the rest)"
type: boolean
default: false

permissions:
id-token: write
Expand Down Expand Up @@ -94,8 +102,8 @@ jobs:
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.ASSUMABLE_ROLE_NAME }}
aws-region: ${{ vars.DBT_TEST_ATHENA_REGION_NAME }}
# run flaky tests command if run-flaky-tests flag is true. Otherwise, run the other tests
- run: ${{ inputs.run-flaky-tests && "hatch run integration-tests -m flaky -n1 --ddtrace" || hatch run integration-tests -m "not flaky" }}
# run flaky tests command if is-flaky-test-run flag is true. Otherwise, run the other tests
- run: ${{ inputs.is-flaky-test-run && "hatch run integration-tests -m flaky -n1 --ddtrace" || hatch run integration-tests -m "not flaky" }}
working-directory: ./${{ inputs.package }}

integration-tests-bigquery:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
run-flaky-tests: false
is-flaky-test-run: false
secrets: inherit
# Special case here for Athena, since we have two identical packages -- dbt-athena and dbt-athena-community
# We don't want certain tests within this adapter to run in parallel
Expand All @@ -104,7 +104,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
run-flaky-tests: true
is-flaky-test-run: true
secrets: inherit
# This job does nothing and is only used for branch protection
results:
Expand Down

0 comments on commit 2474f38

Please sign in to comment.