Skip to content

Commit

Permalink
updates refleching changes in actions repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Apr 23, 2024
1 parent 5b094f1 commit 8d27c17
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 251 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Build artifacts"

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:
build-artifacts:
name: "Build artifacts"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJSON(vars.DBT_PYTHON_VERSIONS) }}
steps:
- name: "Check out ${{ github.repository }}@${{ inputs.ref }}"
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
persist-credentials: false

- name: "Setup environment"
uses: dbt-labs/actions/hatch/environment/create@add-hatch-actions
with:
python-version: ${{ matrix.python-version }}

- name: "Build artifacts"
uses: dbt-labs/actions/hatch/artifacts/create.yml@add-hatch-actions
with:
archive-name: ${{ inputs.archive-name }}
12 changes: 2 additions & 10 deletions .github/workflows/ci-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,22 @@ jobs:
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
uses: dbt-labs/actions/.github/workflows/build-artifacts.yml@add-hatch-actions
with:
ref: ${{ inputs.ref }}
archive-name: ${{ needs.release-inputs.outputs.archive-name }}
archive-name: ${{ inputs.archive-name }}
17 changes: 4 additions & 13 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ on:
description: "The branch/tag/commit to run code quality on"
type: string
required: true
check-command:
description: "The command to run code quality checks"
type: string
required: true
python-version:
description: "The python version to test against"
type: string
required: true

permissions: read-all

Expand All @@ -44,18 +36,17 @@ jobs:
persist-credentials: false

- name: "Setup environment"
uses: ./setup-environment
uses: dbt-labs/actions/hatch/environment/create@add-hatch-actions
with:
python-version: ${{ inputs.python-version }}
python-version: ${{ vars.DBT_PYTHON_VERSION }}

- name: "Run code quality"
shell: bash
run: ${{ inputs.check-command }}
run: hatch run code-quality

- name: "[INFO] Run code quality"
shell: bash
run: |
echo "::notice title=$TITLE::$MESSAGE"
run: echo "::notice title=$TITLE::$MESSAGE"
env:
TITLE: "Run code quality"
MESSAGE: "Code quality checks completed successfully!"
13 changes: 9 additions & 4 deletions .github/workflows/daily-dev-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jobs:
- name: "Checkout `${{ github.repository }}`"
uses: actions/checkout@v3

- name: "Setup environment"
uses: dbt-labs/actions/hatch/environment/create@add-hatch-actions
with:
ref: ${{ vars.DBT_PYTHON_VERSION }}

- name: "Set: commit"
id: commit
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
Expand All @@ -45,17 +50,17 @@ jobs:
run: echo "version=$(hatch version)" >> $GITHUB_OUTPUT

- name: "Audit Version And Parse Into Parts"
id: semver
id: version
uses: dbt-labs/actions/[email protected]
with:
version: ${{ steps.current-version.outputs.version }}

- name: "Set: release version"
id: release-version
run: |
version="${{ steps.semver.outputs.major }}"
version+=".${{ steps.semver.outputs.minor }}"
version+=".$(${{ steps.semver.outputs.patch }}+1)"
version="${{ steps.version.outputs.major }}"
version+=".${{ steps.version.outputs.minor }}"
version+=".$(${{ steps.version.outputs.patch }}+1)"
version+="dev$(date +'%m%d%Y')"
echo "version=$version" >> $GITHUB_OUTPUT
Expand Down
148 changes: 0 additions & 148 deletions .github/workflows/dev-branch-integration-tests.yml

This file was deleted.

Loading

0 comments on commit 8d27c17

Please sign in to comment.