Skip to content

ci(e2e): skip e2e on docs and version-bump-only PRs#3875

Merged
ben-dz merged 3 commits into
mainfrom
bdz/skip-e2e-version-bump
Jun 10, 2026
Merged

ci(e2e): skip e2e on docs and version-bump-only PRs#3875
ben-dz merged 3 commits into
mainfrom
bdz/skip-e2e-version-bump

Conversation

@ben-dz

@ben-dz ben-dz commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Skip the e2e and shreds-e2e suites on PRs where the suites add no signal — version bumps and docs/RFC-only changes — so they don't burn ~20 minutes of self-hosted runner time building images and running the full suite.
  • A new gate step in each workflow's setup job inspects the PR's changed files via the API. A PR qualifies only if every file is either markdown (*.md, any path; renames/copies must come from markdown too, since a rename also deletes the source path) or Cargo.toml/Cargo.lock with diffs touching nothing but version = "..." lines, with the two Cargo files changing together. A dependency bump fails the check — cargo update changes Cargo.lock checksum/source lines, an inline requirement change in Cargo.toml doesn't match the version-line shape, and a requirement change that leaves the lock untouched fails the pairing rule — as does any code file or an API-truncated patch. All of those fall through to a normal e2e run. Markdown is verified inert: no .md files are used as test fixtures, embedded via include_str!, or read by e2e code.
  • Because the gated matrix jobs never create their shard check runs, the gate reports the required e2e (shard 1-5) / shard-e2e (shard 1-4) contexts as successful on the PR head via the checks API (same pattern the trusted fork-PR flow already uses), so branch protection doesn't block the merge.
  • The gate runs only on same-repo pull_request events; fork PRs, pushes to main/hotfix, and trusted workflow_dispatch runs are unaffected. Any gate error fails open to running e2e.

Diff Breakdown

Category Files Lines (+/-) Net
Config/build 2 +152 / -0 +152

Workflow-only change; the same gate logic is added to both e2e workflows.

Key files (click to expand)
  • .github/workflows/e2e.yml — skip-gate step + early exit in the existing run-e2e gate; reports e2e (shard 1-5) checks when skipping
  • .github/workflows/shreds-e2e.yml — same gate; reports shard-e2e (shard 1-4) checks when skipping

Testing Verification

  • Ran the gate's file-classification logic (extracted verbatim into a node harness) against real PR data: Bump to 0.27.1 #3874 (0.27.1 version bump) correctly classifies as skippable; client: revert auto-allocate IP on connect when behind NAT (#3861) #3870 (code change) correctly runs e2e.
  • Synthetic dependency-bump cases all run e2e: cargo update-shaped Cargo.lock diff (checksum lines); dependency requirement change in Cargo.toml, both inline and multi-line-table form with the lock untouched; lock-only version-line change.
  • Synthetic markdown cases: new RFC added, RFC+README edits, markdown deleted, markdown renamed from markdown, and version bump + RFC edit all skip; markdown plus a code file, a file renamed from .rs to .md, and a Cargo.lock with an API-omitted patch all run e2e.
  • actionlint passes on both workflows.

@elitegreg elitegreg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about any *.md file?

@ben-dz ben-dz changed the title ci(e2e): skip e2e on version-bump-only PRs ci(e2e): skip e2e on docs and version-bump-only PRs Jun 10, 2026
@ben-dz ben-dz enabled auto-merge (squash) June 10, 2026 20:25
@ben-dz ben-dz merged commit 6a8c676 into main Jun 10, 2026
38 of 39 checks passed
@ben-dz ben-dz deleted the bdz/skip-e2e-version-bump branch June 10, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants