Skip to content

Commit

Permalink
update workflows with the new working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Dec 18, 2024
1 parent fdcbab1 commit 05589ac
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/changelog-existence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ permissions:

jobs:
changelog:
uses: dbt-labs/actions/.github/workflows/changelog-existence.yml@main
uses: dbt-labs/dbt-adapters/.github/workflows/_changelog-entry-check.yml@main
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-bigquery contributing guide](https://github.com/dbt-labs/dbt-bigquery/blob/main/CONTRIBUTING.md).'
skip_label: 'Skip Changelog'
pull-request: ${{ github.event.pull_request.number }}
secrets: inherit # this is only acceptable because we own the action we're calling
5 changes: 4 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,12 @@ jobs:
- name: Update Adapters and Core branches (update dev_requirements.txt)
if: github.event_name == 'workflow_dispatch'
run: |
./.github/scripts/update_dev_dependency_branches.sh \
scripts/update_dev_dependency_branches.sh \
${{ inputs.dbt_adapters_branch }} \
${{ inputs.dbt_core_branch }} \
${{ inputs.dbt_common_branch }}
cat hatch.toml
working-directory: ./dbt-bigquery

- run: hatch run integration-tests tests/functional -k "not TestPython"
env:
Expand All @@ -222,6 +223,7 @@ jobs:
DATAPROC_REGION: us-central1
DATAPROC_CLUSTER_NAME: dbt-test-1
GCS_BUCKET: dbt-ci
working-directory: ./dbt-bigquery

# python integration tests are slow so we only run them seperately and for a single OS / python version
test-python:
Expand Down Expand Up @@ -269,6 +271,7 @@ jobs:
DATAPROC_REGION: us-central1
DATAPROC_CLUSTER_NAME: dbt-test-1
GCS_BUCKET: dbt-ci
working-directory: ./dbt-bigquery

require-label-comment:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
uses: pypa/hatch@install

- run: hatch run unit-tests
working-directory: ./dbt-bigquery

build:
name: build packages
Expand All @@ -104,19 +105,23 @@ jobs:

- name: Build distributions
run: hatch build
working-directory: ./dbt-bigquery

- name: Show distributions
run: ls -lh dist/
working-directory: ./dbt-bigquery

- name: Check distribution descriptions
run: hatch run build:check-all
working-directory: ./dbt-bigquery

- name: Check if this is an alpha version
id: check-is-alpha
run: |
export is_alpha=0
if [[ "$(ls -lh dist/)" == *"a1"* ]]; then export is_alpha=1; fi
echo "is_alpha=$is_alpha" >> $GITHUB_OUTPUT
working-directory: ./dbt-bigquery

- uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:

- id: version-number-sources
run: echo "current_version=$(hatch version)" >> $GITHUB_OUTPUT
working-directory: ./dbt-bigquery

- name: "Audit Version And Parse Into Parts"
id: semver
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,13 @@ jobs:
archive_name=${{ github.event.repository.name }}-${{ inputs.version }}-${{ inputs.deploy-to }}
echo "name=$archive_name" >> $GITHUB_OUTPUT
- run: hatch build && hatch run build:check-all
working-directory: ./dbt-bigquery
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.archive.outputs.name }}
path: dist/
retention-days: 3
working-directory: ./dbt-bigquery

github-release:
name: GitHub Release
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release_prep_hatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ jobs:
is_current=true
fi
echo "is-current=$is_current" >> $GITHUB_OUTPUT
working-directory: ./dbt-bigquery

- name: "[INFO] Skip version bump"
if: steps.version.outputs.is-current == 'true'
Expand All @@ -156,6 +157,7 @@ jobs:
does_exist=true
fi
echo "exists=$does_exist">> $GITHUB_OUTPUT
working-directory: ./dbt-bigquery

- name: "[INFO] Skip changelog generation"
if: steps.changelog.outputs.exists == 'true'
Expand Down Expand Up @@ -255,11 +257,13 @@ jobs:
changie merge
env:
CHANGIE_CORE_TEAM: ${{ needs.core-team.outputs.team_membership }}
working-directory: ./dbt-bigquery

- name: "Remove trailing whitespace and missing new lines"
# this step will fail on whitespace errors but also correct them
continue-on-error: true
run: hatch run code-quality
working-directory: ./dbt-bigquery

- name: "Commit & push changes"
run: |
Expand Down Expand Up @@ -310,6 +314,7 @@ jobs:

- name: "Bump version to ${{ inputs.version }}"
run: hatch version ${{ inputs.version }}
working-directory: ./dbt-bigquery

- name: "Commit & push changes"
run: |
Expand Down Expand Up @@ -355,6 +360,7 @@ jobs:

- name: "Run unit tests"
run: hatch run unit-tests
working-directory: ./dbt-bigquery

integration-tests:
runs-on: ubuntu-latest
Expand All @@ -381,6 +387,7 @@ jobs:

- name: "Run integration tests"
run: hatch run integration-tests
working-directory: ./dbt-bigquery

merge-release-branch:
runs-on: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions dbt-bigquery/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
path = "dbt/adapters/bigquery/__version__.py"

[build.targets.sdist]
packages = ["dbt"]
packages = ["src/dbt"]
sources = ["src"]

[build.targets.wheel]
packages = ["dbt"]
packages = ["src/dbt"]
sources = ["src"]

[envs.default]
python = "3.9"
Expand Down

0 comments on commit 05589ac

Please sign in to comment.