Skip to content

Commit

Permalink
move default runner and python version into repo variables; limit CI …
Browse files Browse the repository at this point in the history
…checks to one scenario and move all scenarios into scheduled checks
  • Loading branch information
mikealfare committed Jan 30, 2025
1 parent e7e4621 commit 4a92bdc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/_integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:

integration-tests-bigquery-flaky:
# we only run this for one python version to avoid running in parallel
if: ${{ inputs.package == 'dbt-bigquery' && inputs.python-version == '3.9' }}
if: ${{ inputs.package == 'dbt-bigquery' && inputs.python-version == vars.DEFAULT_PYTHON_VERSION }}
runs-on: ${{ inputs.os }}
environment:
name: "dbt-bigquery"
Expand Down Expand Up @@ -290,7 +290,7 @@ jobs:

integration-tests-redshift-flaky:
# we only run this for one python version to avoid running in parallel
if: ${{ inputs.package == 'dbt-redshift' && inputs.python-version == '3.9' }}
if: ${{ inputs.package == 'dbt-redshift' && inputs.python-version == vars.DEFAULT_PYTHON_VERSION }}
runs-on: ${{ inputs.os }}
environment:
name: "dbt-redshift"
Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ jobs:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.affected-packages.outputs.changelog-entry-check) }}
os: [ubuntu-22.04]
python-version: ["3.9", "3.10", "3.11", "3.12"]
with:
package: "dbt-athena"
package: ${{ matrix.package }}
pull-request: ${{ github.event.pull_request.number }}
secrets: inherit

Expand All @@ -73,14 +71,12 @@ jobs:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.affected-packages.outputs.verify-build) }}
os: [ubuntu-22.04, macos-14, windows-2022]
python-version: ["3.9", "3.12"]
with:
package: ${{ matrix.package }}
branch: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
os: ${{ vars.DEFAULT_RUNNER }}
python-version: ${{ vars.DEFAULT_PYTHON_VERSION }}

unit-tests:
uses: ./.github/workflows/_unit-tests.yml
Expand All @@ -90,14 +86,12 @@ jobs:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.affected-packages.outputs.unit-tests) }}
os: [ubuntu-22.04, macos-14, windows-2022]
python-version: ["3.9", "3.12"]
with:
package: ${{ matrix.package }}
branch: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
os: ${{ vars.DEFAULT_RUNNER }}
python-version: ${{ vars.DEFAULT_PYTHON_VERSION }}

integration-tests:
uses: ./.github/workflows/_integration-tests.yml
Expand All @@ -107,14 +101,12 @@ jobs:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.affected-packages.outputs.integration-tests) }}
os: [ubuntu-22.04]
python-version: ["3.9", "3.12"]
with:
package: ${{ matrix.package }}
branch: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
os: ${{ vars.DEFAULT_RUNNER }}
python-version: ${{ vars.DEFAULT_PYTHON_VERSION }}
secrets: inherit

# This job does nothing and is only used for branch protection
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/scheduled-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- "dbt-snowflake"
- "dbt-spark"
os: [ubuntu-22.04, macos-14, windows-2022]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ${{ fromJson(vars.SUPPORTED_PYTHON_VERSIONS) }}
with:
package: ${{ matrix.package }}
branch: ${{ github.event.pull_request.head.ref }}
Expand All @@ -45,7 +45,7 @@ jobs:
- "dbt-snowflake"
- "dbt-spark"
os: [ubuntu-22.04, macos-14, windows-2022]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ${{ fromJson(vars.SUPPORTED_PYTHON_VERSIONS) }}
with:
package: ${{ matrix.package }}
branch: ${{ github.event.pull_request.head.ref }}
Expand All @@ -66,14 +66,12 @@ jobs:
- "dbt-redshift"
- "dbt-snowflake"
- "dbt-spark"
os: [ubuntu-22.04]
python-version: ["3.9", "3.10", "3.11", "3.12"]
with:
package: ${{ matrix.package }}
branch: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
os: ${{ vars.DEFAULT_RUNNER }}
python-version: ${{ vars.DEFAULT_PYTHON_VERSION }}
secrets: inherit

notification:
Expand Down

0 comments on commit 4a92bdc

Please sign in to comment.