The GitHub Actions job "Build Health" on 
grails-core.git/ci/conserve-actions-minutes has succeeded.
Run started by GitHub user jdaugherty (triggered by jdaugherty).

Head commit for run:
b9423fb2d11d1063e26180ee2c0261acedc79a5f / James Daugherty 
<[email protected]>
Gate CI through one policy: draft and "no ci" pull requests, and tests by 
branch and commit marker

A draft pull request runs no job of any workflow unless it carries the
"run ci" label, and a pull request labelled "no ci" runs none at all. The
check skips the policy job that every job of the CI and Groovy joint
workflows needs, and the jobs of the workflows without tests (code style,
build health, RAT, CodeQL, vulnerability scan) carry it directly. The one
exception is the Release Drafter, whose autolabeler must label drafts.
Every pull_request trigger lists ready_for_review, which is not a default
type, so marking a draft ready starts CI. A push to a draft, or to a
"no ci" pull request, still cancels the run in flight for that pull
request, as every pull request push does; the replacing run does nothing.

Every workflow that runs tests now calls .github/workflows/ci-policy.yml as
its first job and gates its test jobs, and the test steps of its build jobs,
on the policy's run-tests output. On a release branch below the default
branch, and on a pull request whose base is a side branch rather than a
release branch, the tests run only on request: a commit message starting
with [run tests], the "run ci" label on the pull request, or the run-tests
input of a manual run. On the default branch and every release branch above
it they run unless the message starts with [skip tests], which also wins
over the label and the input. The policy reads the head commit of a pull
request or a dispatched branch through the API, so the markers now work on
pull requests too; the github.event.head_commit.message test it replaces is
empty on pull_request events, so every pull request ran the tests whatever
the message said. The decision and its reason are written to the job
summary, and a notice annotation on the run says when the tests did not run.

The API read is retried five times with a growing pause; when it still
fails the tests run, as they did on every pull request before this change,
with a warning annotation and a note in the job summary, so an API outage
costs runner time rather than a test result and the policy job never skips
the jobs behind it. A manual run (workflow_dispatch) in apache/grails-core
follows the branch rule unless its run-tests input is ticked, which is how
the commit a release is cut from gets tested (RELEASE.md has the step); in
a fork, where the runner time is the fork owner's and not the ASF's, a
manual run runs the tests unless the commit message starts with
[skip tests].

The CI and Groovy joint workflows now cancel the run in flight on a push to
a branch as well as to a pull request: its tests are for a superseded
commit and the replacing run publishes the newer one. The publish jobs
(publishGradle, publish, publishForge, verifyWrapper, docs) run on always()
and check the result of each job they need explicitly, so a publish that
has started completes rather than leaving the snapshot repository with
modules from two commits, while a cancelled test job fails the checks and
nothing of that commit is published; the replacing run is pending until the
cancelled run has finished every job. The explicit checks also fix a bug
that predates this change: the implicit success() check covers every job
upstream, so the skipped test jobs skipped publishForge, verifyWrapper and
docs on every [skip tests] push although their own needs had succeeded,
and under this policy that would have been every 7.x push.

Documented as rule 14 and the "CI policy" section of AGENTS.md, in the
"Continuous Integration" section of CONTRIBUTING.md, and as a prerequisite
in RELEASE.md.

Report URL: https://github.com/apache/grails-core/actions/runs/39441081440

With regards,
GitHub Actions via GitBox

Reply via email to