Move code to vcs versioning #188
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 PyPI version | |
id: pypi-version | |
run: | | |
# Query PyPI for the latest stable version before building current code | |
LATEST_VERSION=$(curl -s https://pypi.org/pypi/setuptools-scm/json | python -c "import sys, json; print(json.load(sys.stdin)['info']['version'])") | |
echo "Latest PyPI version: $LATEST_VERSION" | |
echo "version=$LATEST_VERSION" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
run: uv sync --group test | |
- name: Check API stability against PyPI | |
run: | | |
echo "Comparing current code against PyPI version: ${{ steps.pypi-version.outputs.version }}" | |
uv run griffe check setuptools_scm -ssrc --verbose --against "setuptools-scm==${{ steps.pypi-version.outputs.version }}" |