chore: skip CI checks on the release PR (DEV-6678)#4162
Open
mpro7 wants to merge 1 commit into
Open
Conversation
Release PRs (head branch release-please--*) only bump CHANGELOG.md and version.txt, so the full build-and-test suite is redundant. Gate every job in build-and-test.yml on `!startsWith(github.head_ref, 'release-please')` so they skip for the release-please PR while still running on normal PRs and on pushes to main (preserving the Codecov baseline). Skipped required checks count as passing in branch protection, so the release PR stays mergeable. Mirrors the approach already used in dsp-app. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4162 +/- ##
=======================================
Coverage 85.98% 85.98%
=======================================
Files 538 538
Lines 30571 30571
Branches 3559 3559
=======================================
Hits 26286 26286
Misses 4285 4285
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
DEV-6678
Summary
release-please--*) only bumpCHANGELOG.mdandversion.txt— no source changes — yet they currently run the fullbuild-and-test.ymlsuite (unit, IT, E2E, bagit/jwt/shacl, ingest-IT, docs, formatting, fuseki-version, healthcheck). This wastes CI resources and delays the release PR going green.build-and-test.ymlis now gated on!startsWith(github.head_ref, 'release-please'), so all of them skip on the release PR. This mirrors the approach already in use in dsp-app.Changes
.github/workflows/build-and-test.yml:build-and-test,test-it,test-e2e) gainif: ${{ !startsWith(github.head_ref, 'release-please') }}.test-bagit,test-jwt,test-shacl-validator,test-ingest-integration,test-docs-build,check-fuseki-version-consistency,check-formatting,docker-healthcheck) get the same clause appended to their existinggithub.event_name == 'pull_request'condition.upload-coverageneeds the skipped jobs, so it skips automatically — no change.Why this is safe
head_refis the feature branch → full suite runs (unchanged).head_refis empty →!startsWith('', 'release-please')is true →build-and-test/test-it/test-e2estill run, preserving the per-main-commit Codecov baseline; PR-gated jobs stay off viagithub.event_name. The post-merge release-commit run is intentionally not skipped.if:is reported asskipped, which branch protection counts as passing — so the release PR stays mergeable. The whole workflow still triggers (noon:-level filtering), avoiding the "never reported → blocks merge" footgun.build-and-test.ymlonly; the separateCheck PR Titleworkflow is left running (the release title matches its regex; sub-second cost).Test Plan
actionlintpasses on the change (only a pre-existing warning about the customubuntu-latest-large-runnerlabel, unrelated to this PR).# gate-onlycomments do not bleed into theif:expressions.!startsWith(github.head_ref, 'release-please')is already used in dsp-app'scodeql-analysis.ymlandcloud-run-pr-preview.yml, and dsp-app's gated jobs are themselves required checks — first-party confirmation that skipped-required-via-ifpasses branch protection in this org.🤖 Generated with Claude Code