Skip to content

dependencies(deps): update numpy requirement (#23) #80

dependencies(deps): update numpy requirement (#23)

dependencies(deps): update numpy requirement (#23) #80

Workflow file for this run

name: Build
on:
push:
jobs:
check-pre-commit:
name: Check pre-commit hooks
runs-on: ubuntu-latest
steps:
- name: Setup environment
uses: quintenroets/actions/setup/environment@main
with:
environment: dev
editable: true
- name: Cache dependencies
id: cache
uses: actions/cache@v4
env:
KEY:
pre-commit
${{ runner.os }}
${{ steps.determine-python-version.outputs.python_version }}
with:
save-always: true
path: |
~/.cache/pre-commit
.mypy_cache
key: ${{ env.KEY }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: ${{ env.KEY }}
- name: Run hooks
shell: bash
run: |
hooks=("docformatter" "ruff" "ruff-format" "end-of-file-fixer" "black" "trailing-whitespace" "infer-missing-annotations" "mypy")
for hook in "${hooks[@]}"; do
pre-commit run --show-diff-on-failure --color=always --all-files $hook
done
verify-packaging:
name: Verify packaging
runs-on: ubuntu-latest
steps:
- name: Verify packaging
uses: quintenroets/actions/validate/package@main
extract-python-versions:
name: Extract Python versions
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.extract-python-versions.outputs.versions }}
steps:
- name: Extract Python versions
id: extract-python-versions
uses: quintenroets/actions/setup/extract-python-versions@main
run-tests:
name: Run tests
needs: extract-python-versions
strategy:
matrix:
os: [ubuntu-latest]
python-version: ${{ fromJSON(needs.extract-python-versions.outputs.versions) }}
runs-on: ${{ matrix.os }}
steps:
- name: Run tests
uses: quintenroets/actions/validate/tests@main
with:
python-version: ${{ matrix.python-version }}
publish:
name: Publish package
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: [check-pre-commit, verify-packaging, run-tests]
environment: release
permissions:
id-token: write # Needed for PyPi publishing
contents: write # Needed for GitHub publishing
steps:
- name: Publish
uses: quintenroets/actions/publish@main
trigger-template-sync:
name: Trigger template sync
runs-on: ubuntu-latest
if: github.repository == 'quintenroets/python-package-template' && github.ref == 'refs/heads/main'
needs: [check-pre-commit, verify-packaging, run-tests]
steps:
- name: Trigger template sync
uses: quintenroets/actions/trigger-template-sync@main
with:
token: ${{ secrets.TEMPLATE_SYNC_TRIGGER }}