diff --git a/.github/workflows/pr-and-push.yml b/.github/workflows/pr-and-push.yml index b558943dd..7f2131fb8 100644 --- a/.github/workflows/pr-and-push.yml +++ b/.github/workflows/pr-and-push.yml @@ -17,3 +17,21 @@ jobs: contents: read with: ref: ${{ github.event.pull_request.head.sha }} + + check-api: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + fetch-depth: 0 # We the need the full Git history. + - name: Setup uv + uses: astral-sh/setup-uv@v6 + - name: Check API breaking changes + 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