Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

feat: skip Go builds in CI when no Go code changed#85

Merged
rianjs merged 1 commit intomainfrom
feat/smart-ci
Jan 17, 2026
Merged

feat: skip Go builds in CI when no Go code changed#85
rianjs merged 1 commit intomainfrom
feat/smart-ci

Conversation

@rianjs
Copy link
Collaborator

@rianjs rianjs commented Jan 17, 2026

Summary

Skip Go build, test, and lint jobs when PRs only change non-Go files (docs, packaging, workflows, assets).

Related to #80 (smarter release triggers) - applies the same philosophy to CI.

How It Works

  1. New changes job runs first using dorny/paths-filter
  2. Detects if any Go files changed (**.go, go.mod, go.sum)
  3. build-and-test and lint jobs check the output
  4. If no Go files changed → jobs show as "Skipped"

Why Not Workflow-Level paths: Filter?

Branch protection requires status checks to be reported. If the workflow doesn't run at all, status is "Missing" and PR can't merge. This approach ensures jobs always report status.

Behavior

PR Changes build-and-test lint
Go code Runs Runs
Docs only Skipped Skipped
Workflows only Skipped Skipped
Packaging only Skipped Skipped

Fixes #84

Uses dorny/paths-filter to conditionally skip build-and-test and lint
jobs when only docs, packaging, or workflow files changed. Jobs show
as "Skipped" rather than "Missing" so branch protection still works.

Fixes #84
@rianjs rianjs merged commit ad1ad31 into main Jan 17, 2026
3 checks passed
@rianjs rianjs deleted the feat/smart-ci branch January 17, 2026 12:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smarter CI: skip Go builds when no Go code changed

1 participant