OSAC-4322: skip e2e workflows for test-only PRs - #478
Conversation
Add test file patterns to the dorny/paths-filter ignore list in all three e2e workflow files so PRs that only touch test files (unit, integration, contract) do not trigger expensive e2e runs. New ignore patterns: - !**/*_test.go (Go test files) - !**/testdata/** (Go test fixtures) - !**/test/** (integration test dirs) - !**/tests/** (Python test dirs) - !**/it/** (fulfillment-service integration tests) - !**/conftest.py (pytest config) - !**/fixtures/** (test fixtures) The existing dorny/paths-filter `predicate-quantifier: 'every'` semantics ensure that PRs touching both test AND non-test files still trigger e2e — the skip only applies when every changed file matches an ignore pattern. unit-tests.yml and integration-tests.yml are intentionally NOT changed: test-only PRs should still run those lighter CI checks. Signed-off-by: Chai Bot <ship-help-github@redhat.com>
|
@redhat-chai-bot: This pull request references OSAC-4322 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: osac-project/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe BMaaS, CaaS, and VMaaS full-install E2E workflows now ignore test-related files and directories in their path filters. ChangesE2E path filters
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change skips resource-intensive e2e workflows when a pull request contains only test-file changes while preserving the required gate status. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 10 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (10 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
|
/ok-to-test |
|
Labeled |
|
/retest |
|
Re-triggered failed runs:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akshaynadkarni, redhat-chai-bot The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
Skip e2e workflow runs (vmaas, caas, bmaas) when a PR only adds or modifies test files. This avoids wasting CI resources on PRs that introduce no production logic changes.
See OSAC-4322 and PR #460 for context.
Changes
Adds test file patterns to the
dorny/paths-filterignore list in all three e2e workflow files:.github/workflows/e2e-vmaas-full-install.yml.github/workflows/e2e-caas-full-install.yml.github/workflows/e2e-bmaas-full-install.ymlNew ignore patterns added:
How it works
The
dorny/paths-filterstep withpredicate-quantifier: 'every'setscodetotrueonly when at least one changed file does NOT match any ignore pattern. If a PR touches only test files (which now match the ignore patterns),codebecomesfalse,should-runbecomesfalse, and the e2e job is skipped — while the gate job still reports success (viaif: always()) so branch protection stays green.What is NOT changed
unit-tests.ymlandintegration-tests.yml— these should always run for test-only PRsAI-generated. Review for accuracy.
@romfreiman requested in Slack thread
Summary by CodeRabbit