Move code to vcs versioning #191
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 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 --group test | |
- 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 python check_api.py --against ${{ steps.latest-tag.outputs.tag }} |