test(a2a): promote the A2A server batch to @stable (#1349) (#1351) #439
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: Update Coverage Summary | |
| # Auto-regenerates the Coverage Summary table inside QA-CHECKLIST.md after | |
| # each merge to main. The table is derived data — counts of [x]/[-]/[ ]/[~]/[!] | |
| # bullets per module — so no developer should ever need to edit it manually. | |
| # | |
| # Pushes performed via the default GITHUB_TOKEN do not re-trigger workflows, | |
| # so this job cannot recurse on itself. The `[skip ci]` token in the commit | |
| # message is a defensive belt-and-suspenders. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "QA-CHECKLIST.md" | |
| - "scripts/coverage-summary.ts" | |
| - "scripts/stable-tests.ts" | |
| # The `@stable` parser the Phase 0 generator reads from (#985). | |
| - "scripts/lib/stable-tests.ts" | |
| # Unlike a git pathspec, an Actions `paths:` filter DOES match a spec | |
| # sitting directly under `tests/` — so this one needs no `tests/*.spec.ts` | |
| # companion. Measured, not assumed (issue #1016): commit f0bee50 was a | |
| # single-commit push to main whose only changed file was | |
| # `tests/collect-models.spec.ts`, and this workflow ran on it | |
| # (event=push, conclusion=success). The identical-looking git pathspec in | |
| # `pr-validation.yml` silently missed that same file — different glob | |
| # engine, different rules. Don't port a fix from there to here. | |
| - "tests/**/*.spec.ts" | |
| - ".github/workflows/update-coverage-summary.yml" | |
| jobs: | |
| update-coverage: | |
| name: Regenerate Coverage Summary | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: write | |
| # Skip when this very workflow's auto-commit lands on main. | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Regenerate Coverage Summary | |
| run: npm run coverage:summary | |
| - name: Commit and push if changed | |
| run: | | |
| if git diff --quiet QA-CHECKLIST.md; then | |
| echo "Coverage Summary table already up to date — nothing to commit." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add QA-CHECKLIST.md | |
| git commit -m "chore(checklist): auto-update coverage summary [skip ci]" | |
| # Push with regenerate-retry. A bare push loses the fast-forward race | |
| # when another commit lands on main first (concurrent merge, or a | |
| # parallel run of this same workflow), dying "! [rejected] (fetch | |
| # first)" and dropping the regenerated table. Because the Coverage | |
| # Summary is a DETERMINISTIC function of source, the safe retry is to | |
| # re-sync onto the newest main and regenerate on top of it (a plain | |
| # rebase could conflict inside the generated block). Same | |
| # concurrent-push class as the daily-history fix (#818). | |
| for attempt in 1 2 3 4 5; do | |
| if git push; then | |
| echo "Coverage summary pushed (attempt $attempt)." | |
| exit 0 | |
| fi | |
| echo "::warning::push rejected (attempt $attempt) — re-syncing onto origin/main, regenerating, retrying." | |
| git fetch origin main | |
| git reset --hard origin/main | |
| npm run coverage:summary | |
| if git diff --quiet QA-CHECKLIST.md; then | |
| echo "Coverage Summary already up to date on the new main — nothing to commit." | |
| exit 0 | |
| fi | |
| git add QA-CHECKLIST.md | |
| git commit -m "chore(checklist): auto-update coverage summary [skip ci]" | |
| done | |
| echo "::error::Could not push coverage summary after 5 attempts." | |
| exit 1 |