ci: skip CI on docs-only changes via paths-ignore#105
Merged
Conversation
Add paths-ignore to the push trigger so pushes touching only docs/ markdown/LICENSE/.gitignore skip python-package.yml. Any code, test, requirements, or workflow change still runs the full matrix. Closes #104
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
paths-ignorefilter to thepushtrigger in.github/workflows/python-package.ymlso pushes that touch only docs/markdown/LICENSE/.gitignore skip the workflow. Any change to code, tests, requirements, or the workflow file itself still runs the full 5-version matrix (3.10–3.14).The
buildjob, matrix, and all steps are unchanged — only the trigger block was modified.Rationale:
paths-ignore(blocklist) vspaths(allowlist)paths-ignorefails safe: any new or unanticipated code path still triggers CI. Apathsallowlist would silently skip CI for any path someone forgot to add. The ignore list is deliberately limited to files that genuinely cannot affect the lint checks (black/flake8 only run on.py): markdown, thedocs/**tree (verified: only.md/css/images, no Python),LICENSE, and.gitignore.Branch protection
mainhas no branch protection (verified:repos/Bisonai/datamaxi-python/branches/main/protection→ 404), so a skipped workflow leaves no required-check pending. No no-op fallback job is needed; a plainpaths-ignorefilter is sufficient.Test / validation plan
yaml.safe_load(parses OK).on:trigger block changed; job/matrix/steps untouched.README.md) should not triggerpython-package.yml; a push touching any.py/requirements/workflow file should still run the full matrix.Closes #104