Skip to content

ci: add tests-passed gate job for the test matrix - #976

Merged
jbachorik merged 1 commit into
developfrom
claude/ci-tests-gate
Oct 25, 2026
Merged

jbachorik merged 1 commit into
developfrom
claude/ci-tests-gate

Conversation

@jbachorik

@jbachorik jbachorik commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

What does this change do?

Adds a tests-passed job to .github/workflows/continuous.yml. It provides one check that branch protection can require for the whole test matrix.

Why: develop requires only build and CodeQL. Source: the public GET /repos/btraceio/btrace/branches/develop returns required_status_checks.contexts: ["build", "CodeQL"], and GET /rules/branches/develop returns []. That is how Renovate merged #960 at 11:11:24Z while all seven test (N) lanes were still running; they passed at 11:16:18Z. Matrix lanes report as test (8) … test (28-ea), and protection matches check names exactly. So a required context named test never matches a lane; it appears only when the whole job is skipped. Listing every lane would go stale whenever a lane is added or dropped.

How it works:

  • needs: [build, test].
  • if: always(), so the job still runs when build fails or a lane fails or is cancelled. Without it the job would be skipped, and GitHub treats a skipped required check as passing.
  • The job fails unless both needs.build.result and needs.test.result are success. For a matrix job, needs.test.result is success only if every lane succeeded.

Related issue

N/A. Follow-up to #960 merging before its tests finished.

Scope and compatibility

  • I identified the affected module(s) and kept unrelated changes out of this PR.
  • This preserves the supported Java/runtime compatibility tiers, or the change is documented below.
  • This does not change the masked-JAR layout, class-loader boundary, or wire protocol.
  • If it does, I updated the relevant architecture documentation and verification plan. (N/A)

Compatibility or migration notes:

CI only. Merging this PR does not change enforcement. An admin must then add tests-passed as a required status check on develop (Settings → Branches → develop, or the equivalent ruleset). Add it only after this merges; requiring a check that has never reported blocks every PR. publish and cleanup are unchanged.

Testing

  • Unit tests (N/A: workflow only)
  • Integration tests (N/A)
  • spotlessCheck (N/A: no Java sources)
  • Workflow validation

Commands and results:

actionlint .github/workflows/continuous.yml          # exit 0, no findings
python yaml.safe_load -> jobs: build, test, tests-passed, publish, cleanup

# the gate's run script, executed with each result combination:
build=success test=success   -> exit 0
build=success test=failure   -> exit 1
build=success test=cancelled -> exit 1
build=success test=skipped   -> exit 1
build=failure test=success   -> exit 1
build=failure test=failure   -> exit 1
build=failure test=cancelled -> exit 1
build=failure test=skipped   -> exit 1

This PR's own CI is the end-to-end check that the job runs after the matrix and reports tests-passed.

Documentation and release impact

  • User-facing documentation is updated, or no documentation change is needed.
  • Release notes/changelog are updated, or no release-note entry is needed.
  • Samples, distribution contents, or published coordinates are updated if affected.
  • This change is safe to merge independently of a release, or the dependency is explained below.

Release notes / follow-up work:

After merge, an admin should add tests-passed to develop's required checks.

Final checklist

  • I reviewed the complete diff and removed unrelated changes.
  • New or changed behavior has appropriate tests, or the reason for not adding them is explained above.
  • User-facing behavior, APIs, samples, and documentation are consistent with this change.
  • I did not include generated build output, local configuration, credentials, or other accidental files.

Generated by Claude Code


This change is Reviewable

develop's branch protection requires only `build` and `CodeQL`, so
Renovate merged #960 at 11:11:24Z while all seven `test (N)` lanes were
still running. Matrix lanes report as `test (8)`, `test (11)`, ...;
protection matches check names exactly, so the matrix cannot be
required as a whole, and listing lanes goes stale when one is added or
dropped.

Add `tests-passed`, which needs build and test, runs with `if: always()`
(a skipped required check counts as passing) and fails unless both
succeeded. Making it a required check on develop is a settings change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013d3caXQCpuNvgTAwpJMYqK
@jbachorik
jbachorik merged commit da36f09 into develop Oct 25, 2026
17 checks passed
@jbachorik
jbachorik deleted the claude/ci-tests-gate branch October 25, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants