Skip to content

Commit

Permalink
update release to use hatch
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Oct 8, 2024
1 parent 396d4a4 commit a5982b4
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ jobs:
with:
ref: ${{ inputs.branch }}

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

- name: "Install test dependencies"
run: make install_deps

- name: "Run unit tests"
run: make unit_test
- name: "Test with pytest"
run: hatch run unit-tests
working-directory: ./dbt-athena

integration-tests:
name: "Run integration tests"
Expand All @@ -71,31 +69,22 @@ jobs:
ref: ${{ inputs.branch }}
persist-credentials: false

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

- name: "Install build dependencies"
run: |
python -m pip install --upgrade pip
pip install build
- name: "Build ${{ github.event.repository.name }}"
run: python -m build
python-version: ${{ matrix.python-version }}

- name: "Set archive name"
id: archive
run: |
archive_name=${{ github.event.repository.name }}-${{ inputs.version }}-${{ inputs.deploy-to }}
echo "name=$archive_name" >> $GITHUB_OUTPUT
- name: "Upload artifacts"
uses: actions/upload-artifact@v4
- name: "Build ${{ github.event.repository.name }}"
uses: dbt-labs/dbt-adapters/.github/actions/build-hatch@main
with:
name: ${{ steps.archive.outputs.name }}
path: dist/
retention-days: 3
working-dir: ./dbt-athena
archive-name: ${{ steps.archive.outputs.name }}

pypi-release:
name: "PyPI release"
Expand Down

0 comments on commit a5982b4

Please sign in to comment.