Skip to content

[actions] run GHA quick checks in stacks, selectively - #15657

Open
cjllanwarne wants to merge 4 commits into
hail-is:mainfrom
cjllanwarne:cjl_stack_aware_quick_checks
Open

cjllanwarne wants to merge 4 commits into
hail-is:mainfrom
cjllanwarne:cjl_stack_aware_quick_checks

Conversation

@cjllanwarne

Copy link
Copy Markdown
Collaborator

Change Description

Only impacts PRs which are part of github stacks. Automatically skips the actions if the PR is not the head.

Note: these checks are not official gating checks. They are quick version of actions which also happen in the full CI run, to give faster feedback. So skipping them on intermediate commits is fine.

Security Assessment

  • This change cannot impact the Hail Batch instance as deployed by Broad Institute in GCP

@cjllanwarne cjllanwarne changed the title [actions] run quick checks only on the head of stacks [actions] run GHA quick checks on the head of stacks only Aug 11, 2026
@cjllanwarne cjllanwarne linked an issue Aug 27, 2026 that may be closed by this pull request
@cjllanwarne cjllanwarne changed the title [actions] run GHA quick checks on the head of stacks only [actions] run GHA quick checks in stacks, selectively Aug 27, 2026
@cjllanwarne
cjllanwarne requested review from kush-chandra and patrick-schultz and a lite review from Copilot September 3, 2026 18:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new gating logic can unexpectedly skip checks due to a non-existent mergeable label and can also mask failures if the should-run job fails (workflow may go green incorrectly).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the “Static Analysis and Unit Tests” GitHub Actions workflow to selectively run the “quick checks” for PRs that are part of GitHub stacks, skipping intermediate stack PRs, and to adjust the target SHA used by service checks for stacked PRs.

Changes:

  • Add a should-run job that decides whether the rest of the quick-check jobs should execute.
  • Gate most jobs behind needs: should-run + if: needs.should-run.outputs.run == 'true'.
  • For check-services, use the stack’s ultimate base SHA (when present) to improve diffing behavior.
File summaries
File Description
.github/workflows/static-and-unit-tests.yml Adds should-run gating logic, updates check-services target SHA selection for stacks, and updates gate behavior.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/static-and-unit-tests.yml
Comment thread .github/workflows/static-and-unit-tests.yml
@cjllanwarne cjllanwarne added the mergeable Indicates that a mid-stack PR can be tested and considered mergeable by CI (WORK IN PROGRESS) label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mergeable Indicates that a mid-stack PR can be tested and considered mergeable by CI (WORK IN PROGRESS)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI quick actions: run only on head of stack

2 participants