Skip to content

refactor!: split update into patch + replace on BaseSQLRepository #5

refactor!: split update into patch + replace on BaseSQLRepository

refactor!: split update into patch + replace on BaseSQLRepository #5

Workflow file for this run

name: CI
on:
push:
branches: [main, dev]
pull_request:
branches: [main]
permissions:
checks: write
id-token: write
contents: write
jobs:
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/action@v3.0.0
env:
SKIP: no-commit-to-branch,mdformat
test:
name: Test (py${{ matrix.python-version }}, ${{ matrix.pydantic-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
pydantic-version: [pydantic1, pydantic2]
steps:
- uses: actions/checkout@v4
with:
path: furiousapi-sqlmodel
- uses: actions/checkout@v4
with:
repository: nadobando/furiousapi-core
path: furiousapi-core
- uses: astral-sh/setup-uv@v4
with:
python-version: ${{ matrix.python-version }}
enable-caching: true
- name: Run tox
working-directory: furiousapi-sqlmodel
run: |
PY=$(echo "${{ matrix.python-version }}" | tr -d '.')
uv run tox -e py${PY}-${{ matrix.pydantic-version }}
release:
name: Release
if: contains(' refs/heads/dev refs/heads/main ', github.ref)
needs: [pre-commit, test]
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v4
- name: Python Semantic Release
id: semver
uses: python-semantic-release/python-semantic-release@v8.0.8
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: uv build
if: steps.semver.outputs.released == 'true'
- uses: actions/upload-artifact@v4
if: steps.semver.outputs.released == 'true'
with:
name: python-package-distributions
path: dist/
outputs:
released: ${{ steps.semver.outputs.released }}
publish:
name: Publish
needs: [pre-commit, release]
if: needs.release.outputs.released == 'true'
concurrency: release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/