Skip to content

Move code to vcs versioning #187

Move code to vcs versioning

Move code to vcs versioning #187

Workflow file for this run

name: API Stability Check
on:
pull_request:
push:
branches:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
jobs:
api-check:
name: Check API stability with griffe
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: uv sync --group test
- name: Check API stability against PyPI
run: |
# Get the latest version from PyPI
LATEST_VERSION=$(uv pip show setuptools-scm 2>/dev/null | grep "^Version:" | cut -d' ' -f2 || echo "")
if [ -z "$LATEST_VERSION" ]; then
echo "No PyPI version found, installing latest release..."
uv pip install setuptools-scm
LATEST_VERSION=$(uv pip show setuptools-scm | grep "^Version:" | cut -d' ' -f2)
fi
echo "Comparing against PyPI version: $LATEST_VERSION"
# Compare current code against PyPI version
uv run griffe check setuptools_scm -ssrc --verbose --against "setuptools-scm==$LATEST_VERSION"