Skip to content

Fix model rebuilds for forward refs #97

Fix model rebuilds for forward refs

Fix model rebuilds for forward refs #97

Workflow file for this run

name: Test PyPI Release
on:
push:
branches:
- main
paths:
- 'src/**'
- 'pyproject.toml'
- 'setup.py'
pull_request:
branches:
- main
paths:
- 'src/**'
- 'pyproject.toml'
- 'setup.py'
workflow_dispatch: # Allow manual trigger
jobs:
build-and-test:
name: Build and check package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv pip install --system --break-system-packages -r requirements-dev.txt
uv pip install --system --break-system-packages -e .
- name: Run tests
run: pytest
- name: Build package
run: python -m build
- name: Check package with twine
run: twine check dist/*
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-to-testpypi:
name: Publish to TestPyPI
needs:
- build-and-test
runs-on: ubuntu-latest
# Only run on main branch pushes, not PRs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
environment:
name: testpypi
url: https://test.pypi.org/p/enrichmcp
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/