Skip to content

ci: skip the expensive CI job for documentation-only pull requests #3998

Closed

Description

@Astro-Han

Problem

.github/workflows/ci.yml is the only pull-request workflow in this repository with no paths filter:

on:
  pull_request:
    branches: [main]

Every other PR-triggered workflow already scopes itself — windows-recovery.yml, dependency-audit.yml, gitoxide-helper-admission.yml, and cli-package-validation.yml all list explicit paths. ci.yml is both the exception and by far the most expensive: one test job with timeout-minutes: 120 that installs Linux runtime dependencies, enables bubblewrap user namespaces, restores an Electron artifact cache, runs lint, format, build, typecheck, Knip, a Linux sandbox smoke test, and xvfb.

A documentation-only change pays all of it. Concretely, #3988 (+6/-0, two README files) could not be merged with an approving review and no findings, because Required status check "test" is queued.

Why this isn't just a cost issue

test is a required status check under branch protection. That makes the obvious fix wrong in a way worth stating up front: adding paths-ignore to ci.yml would make docs-only PRs unmergeable forever. When a workflow is skipped by a path filter, its check never reports, and a required check that never reports leaves the PR permanently pending rather than passing.

So the change has to keep something named test reporting on every PR.

Possible shapes

  1. Gate job + heavy job. Keep ci.yml triggering on every PR. Add a cheap first job that classifies the changed paths, make the expensive work needs: it and run conditionally, and keep the required check on a job that always completes. The existing Select affected test surfaces step shows the repository already thinks in terms of affected surfaces; this extends that idea one level up, from "which tests" to "any tests at all".
  2. paths-ignore plus a companion workflow that reports the same check name for the ignored paths. Works, but it means two workflows must agree on one check name forever — a second representation of one fact, which this repository generally avoids.
  3. Narrow the required check to something cheaper and make the heavy job non-required. Changes what "green" means, so it needs a maintainer decision rather than an implementation choice.

Option 1 keeps a single authority for the check and is the smallest change; opening this as an enhancement rather than a PR because option 3 in particular is a policy call.

Scope note

The filter should key on paths, not on the effort/* labels — a PR can touch README.md and a .ts file in the same change, and the path set is the authority on what actually needs building.

Activity

  1. added
    enhancement
    help wanted
    on Aug 27, 2026
  2. jackeyfaker77 commented on Aug 27, 2026

    @jackeyfaker77
    Contributor

    Hi, I'd like to work on this issue.
    I reviewed the proposed options, and option 1 looks like the safest direction. My plan is to reuse the existing CI test planner where possible, separate the expensive work from the required test status, and make sure test still reports correctly for both documentation-only and code changes.

    Before I start implementing, could you confirm that option 1 is the preferred direction and clarify which paths should count as documentation-only?

    If this issue is still available, could you assign it to me?

  3. jackeyfaker77 commented on Aug 28, 2026

    @jackeyfaker77
    Contributor

    take

  4. removed
    enhancement
    help wanted
    on Aug 29, 2026
  5. added theissue type on Aug 29, 2026
  6. added a commit that references this issue on Sep 1, 2026
    2de641b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions