diff --git a/.github/workflows/pr-and-push.yml b/.github/workflows/pr-and-push.yml index b558943dd..a9c694c9f 100644 --- a/.github/workflows/pr-and-push.yml +++ b/.github/workflows/pr-and-push.yml @@ -17,3 +17,18 @@ jobs: contents: read with: ref: ${{ github.event.pull_request.head.sha }} + + check-api: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 # We the need the full Git history. + - uses: astral-sh/setup-uv@v6 + - run: | + if ! uvx griffe check --search src --format github strands --against "${{ github.event.pull_request.base.sha || github.event.before || 'HEAD' }}"; then + echo "Breaking API changes detected" + exit 1 + fi