ci: skip build and tests on documentation-only changes#18
Conversation
📝 WalkthroughWalkthroughAdded path-ignore rules to the GitHub Actions workflow so pushes and pull requests no longer trigger for markdown, general docs, LICENSE, and .cursor files, while explicitly allowing Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/cmake-multi-platform.yml:
- Line 11: The workflow is currently ignoring changes under open-someip-spec/**
which prevents ASPICE traceability scripts (validate_requirements.py,
check_spec_requirements.py, generate_traceability_matrix.py,
verify_implementation_status.py) from running on spec-only commits; update the
cmake-multi-platform.yml workflow to stop excluding open-someip-spec/** from the
paths-ignore lists or split the workflow into two jobs so that the lightweight
build/test job may still ignore spec changes while a separate traceability job
always runs and consumes artifacts from open-someip-spec/.
- Line 9: Remove the redundant explicit markdown entries by deleting the
individual 'CONTRIBUTING.md' and 'CHANGELOG.md' items wherever they are listed
alongside the catch-all glob '**/*.md' (in both the push and pull_request event
blocks); keep the single '**/*.md' pattern to cover all .md files and ensure you
update the lists referenced in the push and pull_request blocks so there are no
duplicate markdown entries.
- Around line 8-25: The workflow's top-level paths-ignore entries (the
paths-ignore keys shown) will cause the workflow to be completely skipped and
leave required checks pending; fix by removing the top-level paths-ignore blocks
and either (A) add an inverse "always-pass" workflow that triggers only on the
same docs paths and defines a job named build that echoes success (so the
required check name "build" is always present), or (B) move path detection
inside the workflow using a paths filter action (e.g., dorny/paths-filter or
tj-actions/changed-files) and gate individual jobs with if: conditions so
skipped jobs are treated as successful; target the on.push.paths /
on.pull_request.paths usage or the job name build when implementing the
companion workflow approach.
- Line 17: Two branches entries use space-inside-brackets syntax that YAMLlint
flags; update both occurrences of the branches key (the bracketed list under the
push trigger and the other branches declaration) from `branches: [ "main" ]` to
`branches: ["main"]` to remove the inner spaces and satisfy YAMLlint.
Add paths-ignore to cmake-multi-platform workflow to avoid running build and tests when only documentation files change. Keeps docs/requirements and open-someip-spec paths active to ensure ASPICE traceability scripts still run on spec/requirement changes.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/cmake-multi-platform.yml:
- Around line 8-21: Replace both paths-ignore blocks with paths and switch to
explicit include-then-exclude patterns: add a positive include '**' first, then
turn the previous ignore patterns into negations (e.g. '!**/*.md', '!LICENSE',
'!.cursor/**'), and re-include docs/requirements with a positive pattern
'docs/requirements/**' while excluding the rest of docs with '!docs/**' (so the
final list should include '**', '!**/*.md', '!docs/**', 'docs/requirements/**',
'!LICENSE', '!.cursor/**').
---
Duplicate comments:
In @.github/workflows/cmake-multi-platform.yml:
- Line 15: The YAML linter flags spaces inside the bracketed array for the
branches key; update the branches entry (branches) to remove spaces inside the
brackets (e.g., change branches: [ "main" ] to branches: ["main"] or use the
multi-line list form) so it conforms to YAMLlint rules.
- Around line 8-21: The top-level paths-ignore entries (the paths-ignore key and
the pull_request trigger block) cause the entire workflow to be skipped for
docs-only PRs which leaves required checks in Pending; remove the top-level
paths-ignore blocks (and their duplicated pull_request/paths-ignore section) so
the workflow always registers its status, and instead apply any path filtering
at the job level or use more granular path filters (e.g., move paths-ignore into
specific jobs or use paths on individual workflow triggers) so docs-only PRs
don't leave required checks pending while still avoiding unnecessary job runs.
Summary by CodeRabbit