diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 454ab12c9..d91fd5e6f 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -19,8 +19,7 @@ on: - labeled permissions: - - pull-requests: write# to create the PR + pull-requests: write # to create the PR contents: write # to create the comment if the process fails jobs: diff --git a/.github/workflows/bot-changelog.yml b/.github/workflows/bot-changelog.yml index 92d857636..98b461c42 100644 --- a/.github/workflows/bot-changelog.yml +++ b/.github/workflows/bot-changelog.yml @@ -2,11 +2,11 @@ # - create a `changie` entry for automated PRs using this template: # # kind: (e.g. Dependencies) -# body: -# time: -# custom: -# Author: -# PR: +# body: +# time: +# custom: +# Author: +# PR: # # **why?** # - automate and standardize `changie` entry generation for automated PRs diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml deleted file mode 100644 index 2907f7f1e..000000000 --- a/.github/workflows/build-artifacts.yml +++ /dev/null @@ -1,61 +0,0 @@ -# **what?** -# Verifies python build on all code commited to the repository. This workflow -# should not require any secrets since it runs for PRs from forked repos. By -# default, secrets are not passed to workflows running from a forked repos. - -# **why?** -# Ensure code for dbt meets a certain quality standard. - -# **when?** -# This will run for all PRs, when code is pushed to main, and when manually triggered. -name: "Build release" - -on: - workflow_call: - inputs: - branch: - description: "The branch/tag to run integration tests on" - type: string - default: "main" - archive-name: - description: "The name to use for the upload archive, leave blank for no upload" - type: string - default: "" - workflow_dispatch: - inputs: - branch: - description: "The branch/tag to run integration tests on" - type: string - default: "main" - archive-name: - description: "The name to use for the upload archive, leave blank for no upload" - type: string - default: "" - -permissions: read-all - -concurrency: - group: "${{ github.workflow }}-${{ github.event_name }}-${{ inputs.archive-name }}" - cancel-in-progress: true - -jobs: - build: - name: "Build a release" - runs-on: ubuntu-latest - permissions: - id-token: write # IMPORTANT: this permission is mandatory for trusted publishing - steps: - - name: "Check out ${{ github.repository }}@${{ inputs.branch }}" - uses: actions/checkout@v4 - with: - ref: ${{ inputs.branch }} - - - name: "Setup environment" - uses: dbt-labs/dbt-adapters/.github/actions/setup-environment@update-workflows - with: - python-version: ${{ vars.DBT_TEST_PYTHON_VERSION }} - - - name: "Build ${{ github.event.repository.name }}" - uses: dbt-labs/dbt-adapters/.github/actions/build-artifacts@update-workflows - with: - archive-name: ${{ inputs.archive-name }} diff --git a/.github/workflows/clean-repo.yml b/.github/workflows/clean-repo.yml deleted file mode 100644 index 2ce2837b3..000000000 --- a/.github/workflows/clean-repo.yml +++ /dev/null @@ -1,27 +0,0 @@ -# **what?** -# Cleanup branches left over from automation and testing. -# Also cleanup draft releases from release testing. -# -# **why?** -# The automations are leaving behind branches and releases that clutter the repository. -# Sometimes we need them to debug processes so we don't want them immediately deleted. -# Running on Saturday to avoid running at the same time as an actual release -# to prevent breaking a release mid-release. -# -# **when?** -# - every Saturday at noon UTC -# - manually -name: "Clean repo" - -on: - schedule: - - cron: '0 12 * * SAT' # noon UTC on Saturday - details in `why` above - workflow_dispatch: - -permissions: - contents: write - -jobs: - cleanup-repo: - uses: dbt-labs/actions/.github/workflows/repository-cleanup.yml@main - secrets: inherit diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml deleted file mode 100644 index 800de1a6f..000000000 --- a/.github/workflows/code-quality.yml +++ /dev/null @@ -1,86 +0,0 @@ -# **what?** -# Run code quality checks, e.g. `black`, `flake8`, `mypy`, via `pre-commit` -# -# **why?** -# Ensure code quality meets dbt Labs standards -# -# **when?** -# - runs on all PRs into protected branches -# - runs indirectly during releases and release tests -# - can be manually run -name: "Code quality" - -on: - pull_request: - push: - branches: - - "main" - - "*.latest" - workflow_call: - inputs: - branch: - description: "The branch/tag to run code quality on" - type: string - default: "main" - dbt-adapters-branch: - description: "The branch/tag of `dbt-adapters` to use" - type: string - default: "main" - dbt-common-branch: - description: "The branch/tag of `dbt-common` to use" - type: string - default: "main" - workflow_dispatch: - inputs: - branch: - description: "The branch/tag to run code quality on" - type: string - default: "main" - dbt-adapters-branch: - description: "The branch/tag of `dbt-adapters` to use" - type: string - default: "main" - dbt-common-branch: - description: "The branch/tag of `dbt-common` to use" - type: string - default: "main" - -permissions: read-all - -concurrency: - group: "${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}" - cancel-in-progress: true - -jobs: - code-quality: - name: "Code quality" - runs-on: ubuntu-latest - steps: - - name: "Check out ${{ github.repository }}@${{ inputs.branch }} (non-PR)" - if: github.event_name != 'pull_request_target' - uses: actions/checkout@v4 - with: - ref: ${{ inputs.branch }} - persist-credentials: false - - - name: "Check out ${{ github.repository }}@${{ inputs.branch }} (PR)" - if: github.event_name == 'pull_request_target' - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: "Setup environment" - uses: dbt-labs/dbt-adapters/.github/actions/setup-environment@update-workflows - with: - python-version: ${{ vars.DBT_TEST_PYTHON_VERSION }} - - - name: "Update development branches" - if: ${{ contains(github.event_name, 'workflow_') }} - uses: ./.github/actions/update-dev-branches - with: - dbt-adapters-branch: ${{ inputs.dbt-adapters-branch }} - dbt-common-branch: ${{ inputs.dbt-common-branch }} - - - name: "Run code quality" - shell: bash - run: hatch run code-quality diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/dev-branch-integration-tests.yml similarity index 75% rename from .github/workflows/integration-tests.yml rename to .github/workflows/dev-branch-integration-tests.yml index 2873de21b..5e413b23c 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/dev-branch-integration-tests.yml @@ -1,29 +1,6 @@ -name: "Integration tests" +name: "Dev branch integration tests" on: - pull_request_target: - push: - branches: - - "main" - - "*.latest" - workflow_call: - inputs: - branch: - description: "The branch/tag to run integration tests on" - type: string - default: "main" - dbt-adapters-branch: - description: "The branch/tag of `dbt-adapters` to use" - type: string - default: "main" - dbt-common-branch: - description: "The branch/tag of `dbt-common` to use" - type: string - default: "main" - dbt-core-branch: - description: "The branch/tag of `dbt-core` to use" - type: string - default: "main" workflow_dispatch: inputs: branch: @@ -46,7 +23,7 @@ on: permissions: read-all concurrency: - group: "${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}" + group: "${{ github.workflow }}-${{ github.event_name }}-${{ github.sha }}" cancel-in-progress: true jobs: @@ -67,7 +44,7 @@ jobs: with: msg: | "Thanks for your contribution! "\ - "Since this is a fork, integration tests need to be approved prior to running. "\ + "This PR was created from a fork, integration tests need to be approved prior to running. "\ "@dbt-labs/core will review this PR and approve running integration tests." check_for_duplicate_msg: true @@ -115,7 +92,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - name: "Setup environment" - uses: dbt-labs/dbt-adapters/.github/actions/setup-environment@update-workflows + uses: dbt-labs/actions/setup-environment@add-hatch-actions with: python-version: ${{ matrix.python-version }} @@ -132,14 +109,28 @@ jobs: run: hatch run integration-tests:all aggregate-results: - name: "Successful integration tests" + name: "Collect integration tests results" needs: integration-tests - if: ${{ !failure() && !cancelled() }} + if: always() && !cancelled() runs-on: ubuntu-latest steps: - - name: "Integration tests completed successfully" + - name: "[INFO] Integration tests - FAILED" + if: failure() shell: bash run: | - title="Integration tests" - message="Integration tests completed successfully!" - echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" + echo "::notice title=[$WORKFLOW]: $TITLE::$MESSAGE" + exit 1 + env: + WORKFLOW: ${{ env.NOTIFICATION_PREFIX }} + TITLE: "Integration tests - FAILED" + MESSAGE: "Integration tests failed!" + + - name: "[INFO] Integration tests - PASSED" + if: ${{ !failure() }} # includes skipped + shell: bash + run: | + echo "::notice title=[$WORKFLOW]: $TITLE::$MESSAGE" + env: + WORKFLOW: ${{ env.NOTIFICATION_PREFIX }} + TITLE: "Integration tests - PASSED" + MESSAGE: "Integration tests completed successfully!" diff --git a/.github/workflows/changelog-check.yml b/.github/workflows/pull-request-changelog-check.yml similarity index 91% rename from .github/workflows/changelog-check.yml rename to .github/workflows/pull-request-changelog-check.yml index dd4b11d76..15c712c84 100644 --- a/.github/workflows/changelog-check.yml +++ b/.github/workflows/pull-request-changelog-check.yml @@ -16,7 +16,7 @@ # - labels are updated on the PR # - new code is pushed to the branch # The action will get skipped if the 'Skip Changelog' label is present. -name: Check Changelog Entry +name: "Changelog check" on: pull_request: @@ -26,7 +26,6 @@ on: - labeled - unlabeled - synchronize - workflow_dispatch: defaults: run: @@ -42,5 +41,4 @@ jobs: with: changelog_comment: "Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the [dbt-redshift contributing guide](https://github.com/dbt-labs/dbt-redshift/blob/main/CONTRIBUTING.md)." skip_label: "Skip Changelog" - # this is only acceptable because we own the action we're calling secrets: inherit diff --git a/.github/workflows/pull-request-checks.yml b/.github/workflows/pull-request-checks.yml new file mode 100644 index 000000000..a5b3358f1 --- /dev/null +++ b/.github/workflows/pull-request-checks.yml @@ -0,0 +1,44 @@ +name: "Pull request checks" + +on: + pull_request_target: + types: + - opened + - synchronize + +permissions: read-all + +concurrency: + group: "${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.head.ref }}" + cancel-in-progress: true + +jobs: + code-quality: + name: "Run code quality" + uses: dbt-labs/actions/.github/workflows/code-quality.yml + with: + ref: ${{ github.event.pull_request.head.ref }} + check-command: "hatch run code-quality" + python-version: ${{ vars.DBT_TEST_PYTHON_VERSION }} + + unit-tests: + name: "Run unit tests" + uses: dbt-labs/actions/.github/workflows/unit-tests.yml + with: + ref: ${{ github.event.pull_request.head.ref }} + test-command: "hatch run unit-tests:all" + python-versions: ${{ vars.DBT_TEST_PYTHON_ALL_VERSIONS }} + + integration-tests: + name: "Run unit tests" + uses: dbt-labs/actions/.github/workflows/integration-tests.yml + with: + ref: ${{ github.event.pull_request.head.ref }} + test-command: "hatch run integration-tests:all" + python-versions-ubuntu: ${{ vars.DBT_TEST_PYTHON_ALL_VERSIONS }} + python-versions-macos: ${{ vars.DBT_TEST_PYTHON_VERSION }} + python-versions-windows: ${{ vars.DBT_TEST_PYTHON_VERSION }} + + verify-build-artifacts: + name: "Verify build artifacts" + uses: dbt-labs/actions/.github/workflows/build-artifacts.yml@add-hatch-actions diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6766c4c7a..1b5dce7ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,34 +100,36 @@ jobs: release-branch: name: "Create a release branch" needs: release-inputs - uses: dbt-labs/dbt-adapters/.github/workflows/release-branch-create.yml@update-workflows - with: - branch: ${{ inputs.branch }} - version: ${{ inputs.version }} - secrets: inherit - - version-bump: - name: "Bump the version" runs-on: ubuntu-latest - needs: release-branch + outputs: + branch: ${{ steps.branch.outputs.branch-name }} steps: - - name: "Check out ${{ github.event.repository.name }}@${{ inputs.branch }}" + - name: "Checkout `${{ inputs.branch }}`" uses: actions/checkout@v4 with: - ref: ${{ needs.release-branch.outputs.branch }} + ref: ${{ inputs.branch }} - - name: "Bump version to `${{ inputs.version }}`" - shell: bash - run: hatch version ${{ inputs.version }} + - name: "Create release branch" + id: branch + uses: dbt-labs/actions/create-temp-branch@add-hatch-actions + with: + branch-stub: "release/${{ inputs.version }}/" - - name: "Commit and push changes" - shell: bash - run: commit + bump-version: + name: "Bump version" + needs: release-branch + uses: dbt-labs/actions/.github/workflows/build-bump-version.yml@add-hatch-actions + with: + branch: ${{ needs.release-branch.outputs.branch }} + version: ${{ inputs.version }} + secrets: inherit changelog: name: "Generate a new changelog" - needs: release-branch - uses: dbt-labs/dbt-adapters/.github/workflows/build-changelog.yml@update-workflows + needs: + - release-branch + - bump-version + uses: dbt-labs/actions/.github/workflows/build-changelog.yml@add-hatch-actions with: branch: ${{ needs.release-branch.outputs.branch }} version: ${{ inputs.version }} @@ -139,9 +141,10 @@ jobs: - release-branch - version-bump - changelog - uses: ./.github/workflows/code-quality.yml + uses: dbt-labs/actions/.github/workflows/code-quality.yml@add-hatch-actions with: branch: ${{ needs.release-branch.outputs.branch }} + check-command: "hatch run code-quality" unit-tests: name: "Run unit tests" @@ -149,9 +152,9 @@ jobs: - release-branch - version-bump - changelog - uses: ./.github/workflows/unit-tests.yml + uses: dbt-labs/actions/.github/workflows/unit-tests.yml@add-hatch-actions with: - branch: ${{ needs.release-branch.outputs.branch }} + ref: ${{ needs.release-branch.outputs.branch }} integration-tests: name: "Run unit tests" @@ -162,6 +165,7 @@ jobs: uses: ./.github/workflows/integration-tests.yml with: branch: ${{ needs.release-branch.outputs.branch }} + test-command: "hatch run unit-tests:all" build-artifacts: name: "Build artifacts" @@ -172,7 +176,7 @@ jobs: - code-quality - unit-tests - integration-tests - uses: ./.github/workflows/build-artifacts.yml + uses: dbt-labs/actions/.github/workflows/build-artifacts.yml@add-hatch-actions with: branch: ${{ needs.release-branch.outputs.branch }} archive-name: ${{ needs.release-inputs.outputs.archive-name }} @@ -182,15 +186,31 @@ jobs: needs: - build-artifacts - release-branch - if: >- - !failure() && !cancelled() && - inputs.deploy-environment == 'prod' && - needs.release-branch.outputs.name - uses: dbt-labs/dbt-adapters/.github/workflows/release-branch-merge.yml@update-workflows - with: - branch: ${{ inputs.branch }} - release-branch: ${{ needs.release-branch.outputs.branch }} - secrets: inherit + runs-on: ubuntu-latest + outputs: + sha: ${{ steps.merge.outputs.sha }} || ${{ steps.merge-test.outputs.sha }} ) + steps: + - name: "Checkout `${{ needs.release-branch.outputs.branch }}`" + uses: actions/checkout@v4 + with: + ref: ${{ needs.release-branch.outputs.branch }} + + - name: "Merge `${{ needs.release-branch.outputs.branch }}` into `${{ inputs.branch }}`" + if: ${{ inputs.deploy-environment == 'prod' }} + id: merge + uses: dbt-labs/actions/github-merge@add-hatch-actions + with: + source-branch: ${{ needs.release-branch.outputs.branch }} + target-branch: ${{ inputs.branch }} + message: "merge {source_ref} into {target_branch} for a release" + + - name: "Get HEAD SHA for test release" + id: merge-test + if: ${{ !(inputs.deploy-environment == 'prod') }} + shell: bash + run: | + git pull + echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT publish-github: name: "Publish to GitHub" @@ -199,7 +219,7 @@ jobs: - release-inputs - changelog - merge-changes - uses: dbt-labs/dbt-adapters/.github/workflows/publish-github.yml@update-workflows + uses: dbt-labs/actions/.github/workflows/publish-github.yml@add-hatch-actions with: archive-name: ${{ needs.release-inputs.outputs.archive-name }} version: ${{ inputs.version }} @@ -209,15 +229,20 @@ jobs: publish-pypi: name: "Publish to PyPI" - if: ${{ !failure() && !cancelled() }} needs: - release-inputs - merge-changes - uses: dbt-labs/dbt-adapters/.github/workflows/publish-pypi.yml@update-workflows - with: - archive-name: ${{ needs.release-inputs.outputs.archive-name }} - version: ${{ inputs.version }} - deploy-environment: ${{ inputs.deploy-environment }} + if: ${{ !failure() && !cancelled() }} + environment: + name: ${{ inputs.deploy-environment }} + url: ${{ vars.PYPI_PROJECT_URL }} + runs-on: ubuntu-latest + steps: + - name: "Publish to PyPI" + uses: .github/actions/publish-pypi + with: + repository-url: ${{ vars.PYPI_REPOSITORY_URL }} + archive-name: ${{ inputs.archive-name }} publish-pypi-internal: name: "Publish to internal PyPI" @@ -235,7 +260,12 @@ jobs: slack-notification: name: "Slack notification" - if: ${{ failure() && (inputs.deploy-environment == 'prod' || inputs.publish-slack-override) }} + if: >- + failure() && + ( + inputs.deploy-environment == 'prod' || + inputs.publish-slack-override + ) needs: - github-release - pypi-release diff --git a/.github/workflows/scheduled-tests.yml b/.github/workflows/scheduled-checks.yml similarity index 86% rename from .github/workflows/scheduled-tests.yml rename to .github/workflows/scheduled-checks.yml index cd5099492..e2af8d7e5 100644 --- a/.github/workflows/scheduled-tests.yml +++ b/.github/workflows/scheduled-checks.yml @@ -23,25 +23,25 @@ permissions: read-all jobs: code-quality: name: "Code quality" - uses: dbt-labs/dbt-redshift/.github/workflows/code-quality.yml + uses: ./.github/workflows/code-quality.yml strategy: matrix: branch: ${{ fromJSON(vars.DBT_SCHEDULED_TESTS_BRANCHES) }} with: branch: ${{ matrix.branch }} - integration-tests: - name: "Integration tests" - uses: dbt-labs/dbt-redshift/.github/workflows/integration-tests.yml + unit-tests: + name: "Unit tests" + uses: ./.github/workflows/unit-tests.yml strategy: matrix: branch: ${{ fromJSON(vars.DBT_SCHEDULED_TESTS_BRANCHES) }} with: branch: ${{ matrix.branch }} - unit-tests: - name: "Unit tests" - uses: dbt-labs/dbt-redshift/.github/workflows/unit-tests.yml + integration-tests: + name: "Integration tests" + uses: ./.github/workflows/integration-tests.yml strategy: matrix: branch: ${{ fromJSON(vars.DBT_SCHEDULED_TESTS_BRANCHES) }} @@ -49,8 +49,8 @@ jobs: branch: ${{ matrix.branch }} verify-build-artifacts: - name: "Unit tests" - uses: dbt-labs/dbt-redshift/.github/workflows/build-artifacts.yml + name: "Verify build artifacts" + uses: dbt-labs/actions/.github/workflows/build-artifacts.yml@add-hatch-actions strategy: matrix: branch: ${{ fromJSON(vars.DBT_SCHEDULED_TESTS_BRANCHES) }} diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/scheduled-stale-issues.yml similarity index 90% rename from .github/workflows/stale-issues.yml rename to .github/workflows/scheduled-stale-issues.yml index e2ecd89dd..51d0a1f49 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/scheduled-stale-issues.yml @@ -3,6 +3,7 @@ name: "Close stale issues and PRs" on: schedule: - cron: "30 1 * * *" + workflow_dispatch: permissions: issues: write diff --git a/.github/workflows/scheduled-test-releases.yml b/.github/workflows/scheduled-test-releases.yml index 1537d7b42..296e2b193 100644 --- a/.github/workflows/scheduled-test-releases.yml +++ b/.github/workflows/scheduled-test-releases.yml @@ -14,9 +14,9 @@ name: "Scheduled test releases" on: - workflow_dispatch: # for manual triggering schedule: - cron: ${{ vars.DBT_SCHEDULED_TEST_RELEASES_SCHEDULE }} + workflow_dispatch: permissions: contents: write # this is the permission that allows creating a new release @@ -32,9 +32,8 @@ jobs: outputs: sha: ${{ steps.commit.outputs.sha }} version: ${{ steps.release-version.outputs.version }} - steps: - - name: "Checkout ${{ github.repository }}" + - name: "Checkout `${{ github.repository }}`" uses: actions/checkout@v3 - name: "Set: commit" @@ -67,6 +66,5 @@ jobs: with: sha: ${{ needs.release-inputs.outputs.sha }} version: ${{ needs.release-inputs.outputs.version }} - branch: "main" deploy-environment: "test" publish-slack-override: true diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index 6da8914b6..000000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: "Unit tests" - -on: - pull_request_target: - push: - branches: - - "main" - - "*.latest" - workflow_call: - inputs: - branch: - description: "The branch/tag to run integration tests on" - type: string - default: "main" - dbt-adapters-branch: - description: "The branch/tag of `dbt-adapters` to use" - type: string - default: "main" - dbt-common-branch: - description: "The branch/tag of `dbt-common` to use" - type: string - default: "main" - dbt-core-branch: - description: "The branch/tag of `dbt-core` to use" - type: string - default: "main" - workflow_dispatch: - inputs: - branch: - description: "The branch/tag to run integration tests on" - type: string - default: "main" - dbt-adapters-branch: - description: "The branch/tag of `dbt-adapters` to use" - type: string - default: "main" - dbt-common-branch: - description: "The branch/tag of `dbt-common` to use" - type: string - default: "main" - dbt-core-branch: - description: "The branch/tag of `dbt-core` to use" - type: string - default: "main" - -permissions: read-all - -concurrency: - group: "${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}" - cancel-in-progress: true - -jobs: - unit-tests: - name: "Unit tests" - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ${{ fromJSON(vars.DBT_TEST_PYTHON_ALL_VERSIONS) }} - steps: - - name: "Check out ${{ github.repository }}@${{ inputs.branch }} (non-PR)" - if: github.event_name != 'pull_request_target' - uses: actions/checkout@v4 - with: - ref: ${{ inputs.branch }} - persist-credentials: false - - - name: "Check out ${{ github.repository }}@${{ inputs.branch }} (PR)" - if: github.event_name == 'pull_request_target' - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: "Setup environment" - uses: dbt-labs/dbt-adapters/.github/actions/setup-environment@update-workflows - with: - python-version: ${{ vars.DBT_TEST_PYTHON_VERSION }} - - - name: "Update development branches" - if: ${{ contains(github.event_name, 'workflow_') }} - uses: ./.github/actions/update-dev-branches - with: - dbt-adapters-branch: ${{ inputs.dbt-adapters-branch }} - dbt-common-branch: ${{ inputs.dbt-common-branch }} - dbt-core-branch: ${{ inputs.dbt-core-branch }} - - - name: "Run unit tests" - shell: bash - run: hatch run unit-tests:all - - aggregate-results: - name: "Successful unit tests" - needs: unit-tests - if: ${{ !failure() && !cancelled() }} - runs-on: ubuntu-latest - steps: - - name: "Unit tests completed successfully" - shell: bash - run: | - title="Unit tests" - message="Unit tests completed successfully!" - echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message"