Skip to content

chore: skip CI checks on the release PR (DEV-6678)#4162

Open
mpro7 wants to merge 1 commit into
mainfrom
feature/dev-6678-remove-unnecessary-checks-from-release-pr
Open

chore: skip CI checks on the release PR (DEV-6678)#4162
mpro7 wants to merge 1 commit into
mainfrom
feature/dev-6678-remove-unnecessary-checks-from-release-pr

Conversation

@mpro7

@mpro7 mpro7 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

DEV-6678

Summary

  • Release PRs (head branch release-please--*) only bump CHANGELOG.md and version.txt — no source changes — yet they currently run the full build-and-test.yml suite (unit, IT, E2E, bagit/jwt/shacl, ingest-IT, docs, formatting, fuseki-version, healthcheck). This wastes CI resources and delays the release PR going green.
  • Every job in build-and-test.yml is 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:
    • Jobs that ran on both push and PR (build-and-test, test-it, test-e2e) gain if: ${{ !startsWith(github.head_ref, 'release-please') }}.
    • PR-gated jobs (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 existing github.event_name == 'pull_request' condition.
    • upload-coverage needs the skipped jobs, so it skips automatically — no change.
    • Added a comment block explaining the rationale and the branch-protection semantics.

Why this is safe

  • Normal PRs: head_ref is the feature branch → full suite runs (unchanged).
  • Push to main: head_ref is empty → !startsWith('', 'release-please') is true → build-and-test/test-it/test-e2e still run, preserving the per-main-commit Codecov baseline; PR-gated jobs stay off via github.event_name. The post-merge release-commit run is intentionally not skipped.
  • Release PR: all jobs skip. A required status check skipped via a job-level if: is reported as skipped, which branch protection counts as passing — so the release PR stays mergeable. The whole workflow still triggers (no on:-level filtering), avoiding the "never reported → blocks merge" footgun.
  • Scope is build-and-test.yml only; the separate Check PR Title workflow is left running (the release title matches its regex; sub-second cost).

Test Plan

  • actionlint passes on the change (only a pre-existing warning about the custom ubuntu-latest-large-runner label, unrelated to this PR).
  • YAML parses; inline # gate-only comments do not bleed into the if: expressions.
  • The expression form !startsWith(github.head_ref, 'release-please') is already used in dsp-app's codeql-analysis.yml and cloud-run-pr-preview.yml, and dsp-app's gated jobs are themselves required checks — first-party confirmation that skipped-required-via-if passes branch protection in this org.
  • No local unit test is possible for GitHub Actions skip semantics; final confirmation is observational on the next release PR (checks show as skipped and the PR is mergeable).

🤖 Generated with Claude Code

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>
@linear-code

linear-code Bot commented Jun 23, 2026

Copy link
Copy Markdown

DEV-6678

@mpro7 mpro7 changed the title chore(ci): skip CI checks on the release PR (DEV-6678) chore: skip CI checks on the release PR (DEV-6678) Jun 23, 2026
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.98%. Comparing base (a978c50) to head (aba8cca).

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           
Flag Coverage Δ
e2e 85.98% <ø> (ø)
integration 85.98% <ø> (ø)
unit 85.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mpro7 mpro7 self-assigned this Jun 23, 2026
@mpro7 mpro7 requested a review from BalduinLandolt June 23, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant