Skip to content

Move code to vcs versioning #210

Move code to vcs versioning

Move code to vcs versioning #210

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: Get latest release tag
id: latest-tag
run: |
# Get the latest git tag (griffe needs a git ref)
LATEST_TAG=$(git describe --tags --abbrev=0 origin/main 2>/dev/null || echo "v9.2.1")
echo "Latest release tag: $LATEST_TAG"
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
- name: Install dependencies
run: uv sync --all-packages --all-groups
- name: Check API stability against latest release
run: |
echo "Comparing current code against tag: ${{ steps.latest-tag.outputs.tag }}"
# Use local check_api.py script which includes griffe-public-wildcard-imports extension
uv run --no-sync python setuptools-scm/check_api.py --against ${{ steps.latest-tag.outputs.tag }}