Skip to content

Commit

Permalink
update workflow files for dbt-adapters move into a package subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Nov 16, 2024
1 parent a27eef8 commit 719f7cc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:

- name: Build `dbt-adapters`
uses: ./.github/actions/build-hatch
with:
working-dir: "./dbt-adapters/"

- name: Build `dbt-tests-adapter`
uses: ./.github/actions/build-hatch
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ jobs:
- name: Setup `hatch`
uses: ./.github/actions/setup-hatch

- name: Run code quality
- name: Run code quality for dbt-adapters
shell: bash
run: hatch run code-quality
with:
working-dir: "./dbt-adapters/"

- name: Run code quality for dbt-tests-adapter
shell: bash
run: hatch run code-quality
with:
working-dir: "./dbt-tests-adapter/"
9 changes: 2 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,31 +76,26 @@ jobs:
name: "Release inputs"
runs-on: ubuntu-latest
outputs:
working-dir: ${{ steps.release-inputs.outputs.working-dir }}
run-unit-tests: ${{ steps.release-inputs.outputs.run-unit-tests }}
archive-name: ${{ steps.release-inputs.outputs.archive-name }}
steps:
- name: "Inputs"
id: release-inputs
run: |
working_dir="./"
run_unit_tests=true
archive_name=${{ inputs.package }}-${{ inputs.version_number }}-${{ inputs.deploy-to }}
if test "${{ inputs.package }}" = "dbt-tests-adapter"
then
working_dir="./dbt-tests-adapter/"
run_unit_tests=false
fi
echo "working-dir=$working_dir" >> $GITHUB_OUTPUT
echo "run-unit-tests=$run_unit_tests" >> $GITHUB_OUTPUT
echo "archive-name=$archive_name" >> $GITHUB_OUTPUT
- name: "[DEBUG]"
run: |
echo package : ${{ inputs.package }}
echo working-dir : ${{ steps.release-inputs.outputs.working-dir }}
echo run-unit-tests : ${{ steps.release-inputs.outputs.run-unit-tests }}
echo archive-name : ${{ steps.release-inputs.outputs.archive-name }}
Expand All @@ -113,7 +108,7 @@ jobs:
deploy_to: ${{ inputs.deploy-to }}
nightly_release: ${{ inputs.nightly_release }}
target_branch: ${{ inputs.target_branch }}
working-dir: ${{ needs.release-inputs.outputs.working-dir }}
working-dir: ./${{ inputs.package }}/
run-unit-tests: ${{ fromJSON(needs.release-inputs.outputs.run-unit-tests) }}
secrets: inherit

Expand Down Expand Up @@ -146,7 +141,7 @@ jobs:
- name: "Build ${{ inputs.package }}"
uses: dbt-labs/dbt-adapters/.github/actions/build-hatch@main
with:
working-dir: ${{ needs.release-inputs.outputs.working-dir }}
working-dir: ./${{ inputs.package }}/
archive-name: ${{ needs.release-inputs.outputs.archive-name }}

github-release:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_prep_hatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,13 @@ jobs:
- name: "Remove Trailing Whitespace Via Pre-commit"
continue-on-error: true
run: |
pre-commit run trailing-whitespace --files dbt/adapters/__about__.py CHANGELOG.md .changes/*
pre-commit run trailing-whitespace --files dbt/adapters/__version__.py CHANGELOG.md .changes/*
git status
# this step will fail on newline errors but also correct them
- name: "Removing Extra Newlines Via Pre-commit"
continue-on-error: true
run: |
pre-commit run end-of-file-fixer --files dbt/adapters/__about__.py CHANGELOG.md .changes/*
pre-commit run end-of-file-fixer --files dbt/adapters/__version__.py CHANGELOG.md .changes/*
git status
- name: "Commit & Push Changes"
run: |
Expand Down

0 comments on commit 719f7cc

Please sign in to comment.