Repository navigation
ci: skip heavy test/lint/build/gen jobs for docs-only pull requests - #7486
harshalsp07 wants to merge 1 commit into
Conversation
✅ Deploy Preview for pipecd-site canceled.
|
There was a problem hiding this comment.
🟡 Changes recommended
Path-filter failures can incorrectly allow the required Go test and lint gates to succeed without running their workloads.
2 open findings
What changed in this PR
Adds docs-only PR detection to reduce unnecessary CI work while preserving required status checks.
Changes:
- Adds SHA-pinned path filtering across four CI workflows.
- Skips heavy build, test, lint, and generation jobs for documentation-only PRs.
- Updates lint completion gates to tolerate intentionally skipped jobs.
| File | Description |
|---|---|
.github/workflows/test.yaml |
Conditionally skips Go, web, and integration tests. |
.github/workflows/lint.yaml |
Conditionally skips linting and vulnerability checks; updates gates. |
.github/workflows/gen.yaml |
Skips code generation validation for docs-only PRs. |
.github/workflows/build.yaml |
Conditionally skips Go, plugin, web, and chart builds. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@harshalsp07, please keep the PR description concise. I suggest stating the intent clearly first, then summarizing the changes |
|
A small trick: you can make a temporary PR including documentation changes (in various places), so that we can verify the new workflow actually skips jobs related to code changes |
|
Trimmed the description — intent first, then the changes. I'll also open a docs-only PR on top of this branch to verify the heavy jobs actually skip. |
|
yeah i got your point now if i think, duplicating the same job in four workflows it would be hard to maintain . |
|
Moved the detection into one reusable workflow, changes.yaml, that all four call via uses: (710a39d). For the skip check, #7489 is a docs-only PR on top of this branch. The Go workflows still need a maintainer approval to run for first-time contributors, so approving one there will show the heavy jobs skipping while the two gates stay green. |
|
Tried the stacked setup in my fork so we don't need a temp branch in this repo — demo PR: harshalsp07#1, run: https://github.com/harshalsp07/pipecd/pull/1/checks Diff there was only the docs change and it did exactly what it should: go, web, integration, helm, chart all skipped while go-test-completed and go-lint-completed stayed green. (gen didn't run in the demo since it only triggers on master, it gets exercised on the first real docs PR after this merges.) |
5a37223 to
617a173
Compare
|
@armistcxy, I consolidated the branch to one commit and updated the PR description. The change-detection failure path now fails the required gates, and the docs-only behavior is verified on my fork. Could you take another look when you have a chance? |
Fixes pipe-cd#7007. Signed-off-by: Harshal <[email protected]>
617a173 to
efdaa48
Compare

Skip heavy CI jobs for pull requests that change only documentation (
docs/**or**/*.md).A reusable workflow detects non-documentation changes for the test, lint, build, and generation workflows. Required Go test and lint gates stay green when those jobs are intentionally skipped, and fail if change detection or module discovery fails. Push and tag builds still run the jobs.
Fixes #7007.
Testing:
actionlint(only finding: the pre-existingubuntu-26.04runner label).