Publish - #752 - cla-bot[bot] #360
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Pull request checks" | |
run-name: "Publish - #${{ github.event.number }} - ${{ github.actor }}" | |
on: | |
pull_request_target: | |
types: [opened, reopened, synchronize, labeled, unlabeled] | |
# only run this once per PR at a time | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number }} | |
cancel-in-progress: true | |
jobs: | |
changelog-entry: | |
uses: ./.github/workflows/_changelog-entry-check.yml | |
with: | |
package: "dbt-athena" | |
pull-request: ${{ github.event.pull_request.number }} | |
secrets: inherit | |
code-quality: | |
uses: ./.github/workflows/_code-quality.yml | |
with: | |
branch: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
verify-builds: | |
uses: ./.github/workflows/_verify-build.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
package: | |
- "dbt-adapters" | |
- "dbt-tests-adapter" | |
- "dbt-athena" | |
- "dbt-athena-community" | |
- "dbt-bigquery" | |
- "dbt-postgres" | |
- "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 }} | |
unit-tests: | |
uses: ./.github/workflows/_unit-tests.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
package: | |
- "dbt-adapters" | |
- "dbt-athena" | |
- "dbt-athena-community" | |
- "dbt-bigquery" | |
- "dbt-postgres" | |
- "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 }} | |
parallel-integration-tests: | |
uses: ./.github/workflows/_integration-tests-trigger.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
package: | |
- "dbt-athena" | |
- "dbt-athena-community" | |
- "dbt-bigquery" | |
- "dbt-postgres" | |
- "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 }} | |
is-serial-test-run: false | |
secrets: inherit | |
# Serial tests are scoped per package. We want serial tests for different packages to execute in parallel. | |
# For example, serial tests under dbt-athena will run in the same time with those in dbt-bigquery, but | |
# we'll have a maximum of one test in athena (or BQ) running at any given time. | |
serial-integration-tests: | |
# We don't want this to run concurrently with parallel-integration-tests | |
needs: parallel-integration-tests | |
uses: ./.github/workflows/_integration-tests-trigger.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
package: | |
- "dbt-athena" | |
- "dbt-athena-community" | |
- "dbt-bigquery" | |
- "dbt-postgres" | |
- "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 }} | |
is-serial-test-run: true | |
concurrency: | |
# The second part of the group string to overwrites dbt-athena-community to dbt-athena, otherwise defaults | |
# to whatever package should run. This is because dbt-athena and dbt-athena-community are the same thing. | |
# We want to avoid running these two in parallel as well | |
group: ${{ github.workflow }}-${{ (matrix.package == "dbt-athena-community" && "dbt-athena") || matrix.package }} | |
secrets: inherit | |
# This job does nothing and is only used for branch protection | |
results: | |
name: "Pull request checks" # keep this name, branch protection references it | |
if: always() | |
needs: [changelog-entry, code-quality, verify-builds, unit-tests, integration-tests] | |
runs-on: ${{ vars.DEFAULT_RUNNER }} | |
steps: | |
- uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} | |
allowed-skips: 'changelog-entry' |