Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Apr 22, 2024
1 parent b7d2a7d commit d4600b2
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 109 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci-test-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "CI test suite"

on:
workflow_call:
inputs:
ref:
description: "The branch/tag/commit to run integration tests on"
type: string
required: true
archive-name:
description: "Name of the archive for build artifacts, used during a release"
type: string
default: ""

permissions: read-all

concurrency:
group: "${{ github.workflow }}-${{ github.event_name }}-${{ inputs.ref }}"
cancel-in-progress: true

jobs:
code-quality:
name: "Run code quality"
uses: dbt-labs/actions/.github/workflows/code-quality.yml@add-hatch-actions
with:
ref: ${{ inputs.ref }}
check-command: "hatch run code-quality"
python-version: ${{ vars.DBT_PYTHON_VERSION }}

unit-tests:
name: "Run unit tests"
uses: dbt-labs/actions/.github/workflows/unit-tests.yml@add-hatch-actions
with:
ref: ${{ inputs.ref }}
test-command: "hatch run unit-tests:all"
python-versions: ${{ vars.DBT_PYTHON_VERSIONS }}

integration-tests:
name: "Run integration tests"
uses: dbt-labs/actions/.github/workflows/integration-tests.yml@add-hatch-actions
with:
ref: ${{ inputs.ref }}
test-command: "hatch run integration-tests:all"
python-versions-ubuntu: ${{ vars.DBT_PYTHON_VERSIONS }}
python-versions-macos: ${{ vars.DBT_PYTHON_VERSION }}
python-versions-windows: ${{ vars.DBT_PYTHON_VERSION }}

build-artifacts:
name: "Verify build artifacts"
uses: dbt-labs/actions/.github/workflows/build-release-artifacts.yml@add-hatch-actions
with:
ref: ${{ inputs.ref }}
archive-name: ${{ needs.release-inputs.outputs.archive-name }}
54 changes: 11 additions & 43 deletions .github/workflows/daily-checks.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,29 @@
# **what?**
# The purpose of this workflow is to trigger CI to run for each release
# branch on a regular cadence. If the CI workflow fails for a branch, it
# will post to dev-core-alerts to raise awareness.
# - run scheduled CI on protected branches
# - post a failure message in #dev-adapter-alerts for failures
#
# **why?**
# Ensures release branches are always shippable and not broken.
# Also, can catch any dependencies shifting beneath us that might
# introduce breaking changes (could also impact Cloud).

# - ensure release branches are always shippable
# - raise awareness of dependencies shifting beneath us
#
# **when?**
# - daily based on DBT_DAILY_CHECKS_SCHEDULE
# - daily at 5:00 AM UTC
# - manually
name: "Daily checks"

on:
schedule:
- cron: ${{ vars.DBT_DAILY_CHECKS_SCHEDULE }}
- cron: 0 5 * * *
workflow_dispatch:

permissions: read-all

jobs:
code-quality:
name: "Code quality"
uses: ./.github/workflows/code-quality.yml
strategy:
matrix:
branch: ${{ fromJSON(vars.DBT_DAILY_CHECKS_BRANCHES) }}
with:
branch: ${{ matrix.branch }}

unit-tests:
name: "Unit tests"
uses: ./.github/workflows/unit-tests.yml
strategy:
matrix:
branch: ${{ fromJSON(vars.DBT_DAILY_CHECKS_BRANCHES) }}
with:
branch: ${{ matrix.branch }}

integration-tests:
name: "Integration tests"
uses: ./.github/workflows/integration-tests.yml
strategy:
matrix:
branch: ${{ fromJSON(vars.DBT_DAILY_CHECKS_BRANCHES) }}
with:
branch: ${{ matrix.branch }}

build-artifacts:
name: "Build artifacts"
uses: dbt-labs/actions/.github/workflows/build-artifacts.yml@add-hatch-actions
strategy:
matrix:
branch: ${{ fromJSON(vars.DBT_DAILY_CHECKS_BRANCHES) }}
ci-test-suite:
name: "CI test suite"
uses: ./.github/workflows/ci-test-suite.yml
with:
branch: ${{ matrix.branch }}
ref: "main"

post-failure:
runs-on: ubuntu-latest
Expand Down
39 changes: 12 additions & 27 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# **what?**
# - run CI on all PRs against protected branches
#
# **why?**
# - ensure code is verified prior to being merged into a protected branch
#
# **when?**
# - a PR is opened against a protected branch
# - code is pushed to a PR against a protected branch
name: "Pull request checks"

on:
Expand All @@ -13,32 +22,8 @@ concurrency:
cancel-in-progress: true

jobs:
code-quality:
name: "Run code quality"
uses: dbt-labs/actions/.github/workflows/code-quality.yml
ci-test-suite:
name: "CI test suite"
uses: ./.github/workflows/ci-test-suite.yml
with:
ref: ${{ github.event.pull_request.head.ref }}
check-command: "hatch run code-quality"
python-version: ${{ vars.DBT_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_PYTHON_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_PYTHON_VERSIONS }}
python-versions-macos: ${{ vars.DBT_PYTHON_VERSION }}
python-versions-windows: ${{ vars.DBT_PYTHON_VERSION }}

verify-build-artifacts:
name: "Verify build artifacts"
uses: dbt-labs/actions/.github/workflows/build-artifacts.yml@add-hatch-actions
44 changes: 5 additions & 39 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,56 +135,22 @@ jobs:
version: ${{ inputs.version }}
secrets: inherit

code-quality:
name: "Run code quality"
needs:
- release-branch
- version-bump
- changelog
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"
ci-test-suite:
name: "Run code quality, unit tests, and integration tests, and build artifacts"
needs:
- release-inputs
- release-branch
- version-bump
- changelog
uses: dbt-labs/actions/.github/workflows/unit-tests.yml@add-hatch-actions
uses: ./.github/workflows/ci-test-suite.yml
with:
ref: ${{ needs.release-branch.outputs.branch }}

integration-tests:
name: "Run unit tests"
needs:
- release-branch
- version-bump
- changelog
uses: dbt-labs/actions/.github/workflows/integration-tests.yml@add-hatch-actions
with:
branch: ${{ needs.release-branch.outputs.branch }}
test-command: "hatch run unit-tests:all"

build-artifacts:
name: "Build artifacts"
if: ${{ !failure() && !cancelled() }}
needs:
- release-inputs
- release-branch
- code-quality
- unit-tests
- integration-tests
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 }}

merge-changes:
name: "Merge the version bump and changelog updates"
needs:
- build-artifacts
- ci-test-suite
- release-branch
runs-on: ubuntu-latest
outputs:
Expand Down

0 comments on commit d4600b2

Please sign in to comment.