Skip to content

Commit

Permalink
more hatch updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Dec 5, 2024
1 parent c4dd3af commit d92f63e
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 73 deletions.
Empty file removed .bumpversion.cfg
Empty file.
File renamed without changes.
19 changes: 9 additions & 10 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ jobs:
commit_sha=$(git rev-parse HEAD)
echo "release_commit=$commit_sha" >> $GITHUB_OUTPUT
- name: "Get Current Version Number"
id: version-number-sources
run: |
current_version=`awk -F"current_version = " '{print $2}' .bumpversion.cfg | tr '\n' ' '`
echo "current_version=$current_version" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- uses: pypa/hatch@install

- id: version-number-sources
run: echo "current_version=$(hatch version)" >> $GITHUB_OUTPUT

- name: "Audit Version And Parse Into Parts"
id: semver
Expand Down Expand Up @@ -108,10 +112,5 @@ jobs:
sha: ${{ needs.aggregate-release-data.outputs.commit_sha }}
target_branch: ${{ needs.aggregate-release-data.outputs.release_branch }}
version_number: ${{ needs.aggregate-release-data.outputs.version_number }}
build_script_path: "scripts/build-dist.sh"
env_setup_script_path: "scripts/env-setup.sh"
s3_bucket_name: "core-team-artifacts"
package_test_command: "dbt -h"
test_run: true
nightly_release: true
secrets: inherit
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ on:
env_setup_script_path:
description: "Environment setup script path"
type: string
default: "scripts/env-setup.sh"
default: "./.github/scripts/env-setup.sh"
required: false
s3_bucket_name:
description: "AWS S3 bucket name"
Expand Down Expand Up @@ -88,7 +88,7 @@ on:
env_setup_script_path:
description: "Environment setup script path"
type: string
default: "scripts/env-setup.sh"
default: "./.github/scripts/env-setup.sh"
required: false
s3_bucket_name:
description: "AWS S3 bucket name"
Expand Down Expand Up @@ -121,7 +121,7 @@ defaults:
jobs:
release-prep:
name: "Release prep: generate changelog, bump version"
uses: dbt-labs/dbt-snowflake/.github/workflows/release_prep_hatch.yml@main
uses: ./.github/workflows/release_prep_hatch.yml
with:
branch: ${{ inputs.branch }}
version: ${{ inputs.version }}
Expand Down
39 changes: 27 additions & 12 deletions .github/workflows/release_prep_hatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ defaults:
shell: bash

env:
PYTHON_TARGET_VERSION: 3.12
PYTHON_DEFAULT_VERSION: 3.9
NOTIFICATION_PREFIX: "[Release Prep]"

jobs:
Expand All @@ -100,16 +100,19 @@ jobs:
echo Deploy to: ${{ inputs.deploy-to }}
echo Nightly release: ${{ inputs.is-nightly-release }}
# ENVIRONMENT VARIABLES
echo Python version: ${{ env.PYTHON_TARGET_VERSION }}
echo Python version: ${{ env.PYTHON_DEFAULT_VERSION }}
echo Notification prefix: ${{ env.NOTIFICATION_PREFIX }}
- name: "Checkout ${{ github.event.repository.name }}@${{ inputs.branch }}"
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}

- name: "Setup `hatch`"
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}

- uses: pypa/hatch@install

- name: "Parse input version"
id: semver
Expand Down Expand Up @@ -223,8 +226,11 @@ jobs:
with:
ref: ${{ needs.release-branch.outputs.name }}

- name: "Setup `hatch`"
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}

- uses: pypa/hatch@install

- name: "Install `changie`"
run: |
Expand Down Expand Up @@ -296,8 +302,11 @@ jobs:
with:
ref: ${{ needs.release-branch.outputs.name }}

- name: "Setup `hatch`"
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}

- uses: pypa/hatch@install

- name: "Bump version to ${{ inputs.version }}"
run: hatch version ${{ inputs.version }}
Expand Down Expand Up @@ -338,8 +347,11 @@ jobs:
with:
ref: ${{ needs.release-branch.outputs.name }}

- name: "Setup `hatch`"
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: pypa/hatch@install

- name: "Run unit tests"
run: hatch run unit-tests
Expand All @@ -361,8 +373,11 @@ jobs:
with:
ref: ${{ needs.release-branch.outputs.name }}

- name: "Set up `hatch`"
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}

- uses: pypa/hatch@install

- name: "Run integration tests"
run: hatch run integration-tests
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/version-bump.yml

This file was deleted.

20 changes: 0 additions & 20 deletions scripts/build-dist.sh

This file was deleted.

0 comments on commit d92f63e

Please sign in to comment.