From 05c8db92e142294326e46f6f2a2016434538de3f Mon Sep 17 00:00:00 2001 From: Jack Yuan Date: Tue, 16 Dec 2025 10:38:02 -0800 Subject: [PATCH 1/5] feat: add api check to github workflow --- .github/workflows/pr-and-push.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/pr-and-push.yml b/.github/workflows/pr-and-push.yml index b558943dd..0143ecffa 100644 --- a/.github/workflows/pr-and-push.yml +++ b/.github/workflows/pr-and-push.yml @@ -17,3 +17,15 @@ 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 + # The following command will compare current changes to latest tag. + - run: uvx griffe check --search src --format github strands-agents \ No newline at end of file From a8e361aa0ef4ea56e2859720371a85c00ed7faa7 Mon Sep 17 00:00:00 2001 From: Jack Yuan <94985218+JackYPCOnline@users.noreply.github.com> Date: Tue, 16 Dec 2025 12:56:52 -0800 Subject: [PATCH 2/5] Update pr-and-push.yml fix package name. --- .github/workflows/pr-and-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-and-push.yml b/.github/workflows/pr-and-push.yml index 0143ecffa..267b4436f 100644 --- a/.github/workflows/pr-and-push.yml +++ b/.github/workflows/pr-and-push.yml @@ -28,4 +28,4 @@ jobs: fetch-depth: 0 # We the need the full Git history. - uses: astral-sh/setup-uv@v6 # The following command will compare current changes to latest tag. - - run: uvx griffe check --search src --format github strands-agents \ No newline at end of file + - run: uvx griffe check --search src --format github strands From 6fef1fa711fb0649575389f938b78eb0cb0ae170 Mon Sep 17 00:00:00 2001 From: Jack Yuan Date: Fri, 19 Dec 2025 12:38:46 -0800 Subject: [PATCH 3/5] fix: Compare against the actual base of the PR or the previous commit on push, rather than the latest tag --- .github/workflows/pr-and-push.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr-and-push.yml b/.github/workflows/pr-and-push.yml index 267b4436f..c71c2eb4c 100644 --- a/.github/workflows/pr-and-push.yml +++ b/.github/workflows/pr-and-push.yml @@ -27,5 +27,4 @@ jobs: with: fetch-depth: 0 # We the need the full Git history. - uses: astral-sh/setup-uv@v6 - # The following command will compare current changes to latest tag. - - run: uvx griffe check --search src --format github strands + - run: uvx griffe check --search src --format github strands --against "${{ github.event.pull_request.base.sha || github.event.before || 'HEAD' }}" From ecbdfa9a0fab6f064834de169d20f5a4167f5cfc Mon Sep 17 00:00:00 2001 From: Jack Yuan Date: Fri, 19 Dec 2025 13:27:10 -0800 Subject: [PATCH 4/5] fix: add more explicit error message --- .github/workflows/pr-and-push.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-and-push.yml b/.github/workflows/pr-and-push.yml index c71c2eb4c..a9c694c9f 100644 --- a/.github/workflows/pr-and-push.yml +++ b/.github/workflows/pr-and-push.yml @@ -27,4 +27,8 @@ jobs: with: fetch-depth: 0 # We the need the full Git history. - uses: astral-sh/setup-uv@v6 - - run: uvx griffe check --search src --format github strands --against "${{ github.event.pull_request.base.sha || github.event.before || 'HEAD' }}" + - 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 From 548caba26a512428d04297741d4be49f2025aa26 Mon Sep 17 00:00:00 2001 From: Jack Yuan Date: Mon, 22 Dec 2025 10:25:06 -0800 Subject: [PATCH 5/5] feat: add name to each step --- .github/workflows/pr-and-push.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-and-push.yml b/.github/workflows/pr-and-push.yml index a9c694c9f..7f2131fb8 100644 --- a/.github/workflows/pr-and-push.yml +++ b/.github/workflows/pr-and-push.yml @@ -23,11 +23,14 @@ jobs: permissions: contents: read steps: - - uses: actions/checkout@v5 + - name: Checkout code + uses: actions/checkout@v5 with: fetch-depth: 0 # We the need the full Git history. - - uses: astral-sh/setup-uv@v6 - - run: | + - 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