Skip to content

fix: updating model input #44

fix: updating model input

fix: updating model input #44

Workflow file for this run

name: Test and Release
on:
push:
branches:
- main
paths:
- 'src/**'
pull_request:
branches:
- main
paths:
- 'src/**'
jobs:
# =======================================================
# First Job: Run all tests, linting, and type checking
# =======================================================
test:
name: Package Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
- "3.12"
# Don't cancel all jobs if one Python version fails
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install dependencies
run: uv sync --all-extras
- name: Lint with Ruff
run: |
uv run ruff check .
uv run ruff format --check .
- name: Run static type checking with Pyright
run: uv run pyright
# TODO: Uncomment and add your pytest command here
# - name: Run tests with Pytest
# run: uv run pytest
# =================================================================
# Second Job: Create a Release PR or a final Release.
# This job will ONLY run if the 'test' job above succeeds.
# =================================================================
release-please:
name: Release Version
# This job depends on the successful completion of the 'test' job
needs: test
# pushes to the 'main' branch, not on pull requests.
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: 1465866
private-key: ${{ secrets.HERING_GITHUB_APP }}
permission-contents: write
permission-pull-requests: write
permission-issues: write
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
- name: Run Release Please
uses: googleapis/release-please-action@v4
with:
# Using a PAT is more robust for triggering other workflows if needed
token: ${{ steps.app-token.outputs.token }}
# This should be 'python' if you are using hatch-vcs as discussed
release-type: simple