Files
floci/.github/workflows/ci.yml
T
dependabot[bot] 0a3188e744 chore(deps): bump the actions-minor-patch group across 1 directory with 8 updates (#9950)
Bumps the actions-minor-patch group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [graalvm/setup-graalvm](https://github.com/graalvm/setup-graalvm) | `1.6.7` | `1.6.10` |
| [docker/login-action](https://github.com/docker/login-action) | `4.7.0` | `4.8.0` |
| [actions/setup-java](https://github.com/actions/setup-java) | `6.1.0` | `6.3.0` |
| [azure/setup-helm](https://github.com/azure/setup-helm) | `5.0.1` | `5.1.0` |
| [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.24.3` | `0.24.4` |
| [anchore/scan-action](https://github.com/anchore/scan-action) | `7.4.2` | `7.4.3` |
| [aws-actions/amazon-ecr-login](https://github.com/aws-actions/amazon-ecr-login) | `2.1.7` | `2.2.0` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `4.1.2` | `4.1.4` |



Updates `graalvm/setup-graalvm` from 1.6.7 to 1.6.10
- [Release notes](https://github.com/graalvm/setup-graalvm/releases)
- [Commits](https://github.com/graalvm/setup-graalvm/compare/27b360dbb857524eaf0b4c4cef364d38e5b4f173...60e76998d25690099182b796e99b8804da582d90)

Updates `docker/login-action` from 4.7.0 to 4.8.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/81c6f93d4bc991e510b342a00b419b3bb4efc5c6...8aa5831fb8d48d8f76594c7ddde61ae58019f550)

Updates `actions/setup-java` from 6.1.0 to 6.3.0
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/b843ebf9b913146b38da2eaa7aeddf76074ae1ad...d1374f8ac74474200d16ef8ecee22c7ae7a51880)

Updates `azure/setup-helm` from 5.0.1 to 5.1.0
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Changelog](https://github.com/Azure/setup-helm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/azure/setup-helm/compare/9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310...2f5e7bc67f1f9972ab16657bb795f36d8f04de0e)

Updates `anchore/sbom-action` from 0.24.3 to 0.24.4
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](https://github.com/anchore/sbom-action/compare/66cbf4bc1f1c0d2edc94016e65bc221b6bb0ad6c...dfcb83b97731532d72be422cbc51ee64adb6fd56)

Updates `anchore/scan-action` from 7.4.2 to 7.4.3
- [Release notes](https://github.com/anchore/scan-action/releases)
- [Changelog](https://github.com/anchore/scan-action/blob/main/RELEASE.md)
- [Commits](https://github.com/anchore/scan-action/compare/27805bf3b4e84b4a5c980df22ed233c00390a439...11983a512817154c80a9db660c1a184be7513ed6)

Updates `aws-actions/amazon-ecr-login` from 2.1.7 to 2.2.0
- [Release notes](https://github.com/aws-actions/amazon-ecr-login/releases)
- [Changelog](https://github.com/aws-actions/amazon-ecr-login/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/amazon-ecr-login/compare/03f1aad4c6c7ffd436567f42f9384779290529bd...7290e214a610b32bc0eef81748948b6d466a8783)

Updates `sigstore/cosign-installer` from 4.1.2 to 4.1.4
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/6f9f17788090df1f26f669e9d70d6ae9567deba6...881c63bd87e38389154debd8331404ce7ca8a3ab)

---
updated-dependencies:
- dependency-name: graalvm/setup-graalvm
  dependency-version: 1.6.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: docker/login-action
  dependency-version: 4.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: actions/setup-java
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: azure/setup-helm
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: anchore/sbom-action
  dependency-version: 0.24.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: anchore/scan-action
  dependency-version: 7.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: aws-actions/amazon-ecr-login
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-12-01 20:41:43 -06:00

330 lines
16 KiB
YAML

name: CI
on:
push:
branches:
- main
paths:
- 'src/**'
- 'pom.xml'
- '.github/ci/**'
- '.github/scripts/release-binaries-*'
- '.github/scripts/release-images-*'
- '.github/release-tooling/contributors*'
- '.github/workflows/ci.yml'
pull_request:
# ready_for_review is not a default type: without it, marking a draft ready
# would not start the run the draft skipped.
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'src/**'
- 'pom.xml'
- '.github/ci/**'
- '.github/scripts/release-binaries-*'
- '.github/scripts/release-images-*'
- '.github/release-tooling/contributors*'
- '.github/workflows/ci.yml'
permissions:
contents: read
# A new push to a pull request cancels its older run: only the latest head matters there.
# On main a running run is left to finish. A run takes about 18 minutes and merges often
# land closer together than that, so cancelling stopped 77 of 138 main runs partway through
# between 2026-10-05 and 2026-10-09 and left most main commits with no result.
# Without cancelling, the concurrency group still holds at most one pending run: a newer
# merge replaces the waiting one before it starts, so a burst of merges is tested once, at
# its newest commit, and no run is stopped halfway.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
# Hardcoded on purpose: strategy.job-total counts EVERY matrix job, so adding an
# unrelated matrix entry later would change the modulus and silently leave part
# of the suite running in no shard. Keep in sync with the matrix below.
SHARD_TOTAL: 5
jobs:
test:
name: Build and Test (shard ${{ matrix.shard }})
runs-on: ubuntu-latest
# A runaway-job kill switch, not a budget: Actions bills the minutes a job actually uses, so a
# higher ceiling adds cost only when a job runs longer. It stopped being a kill switch once the
# suite grew into it: on 2026-11-02 one shard was cut here twice at 25m15s and 25m26s with no
# test having failed, which is why the suite runs in five shards rather than four. A later
# shard's Run tests step was canceled at the 25-minute job limit; leave room for normal variance.
timeout-minutes: 35
# Drafts skip the suite to spare runners; it runs once the PR is ready for review.
# Written on the job rather than as a gate job so it costs no runner. Pushes to main
# always run; `closed` and `edited` are excluded so widening the trigger types cannot
# let those events through.
if: >-
github.event_name != 'pull_request' || (
github.event.pull_request.draft == false &&
github.event.pull_request.state != 'closed' &&
github.event.action != 'edited'
)
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
java-version: '25'
distribution: 'temurin'
# no `cache: maven` - broken in this release line (restore misses, save
# fails with Path Validation Error); explicit cache steps below.
# Restore on every shard; save from shard 1 only. With a combined cache step
# every shard would race the same save key: one wins, the rest spend
# post-job time reserving-then-failing plus redundant multi-hundred-MB uploads.
- id: maven-cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ hashFiles('pom.xml') }}
restore-keys: |
maven-${{ runner.os }}-
# The Maven distribution ./mvnw runs. Without it every shard downloads Maven from Maven
# Central with one unretried wget, and a failed fetch fails the shard at Compile. Its own
# cache, because the restore path is part of the cache version: adding it to the repository
# cache above would make every reader of that key miss.
- id: maven-wrapper-cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.m2/wrapper
key: maven-wrapper-${{ runner.os }}-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
# Derived from test sources, not target/test-classes, so shard.txt exists
# before Compile and the image prefetch below overlaps the compile instead
# of starting moments before the tests that need the images. Every test is
# a top-level class in src/test/java, so the file name is the class name;
# the step after Compile fails the shard if that ever stops being true.
- name: Compute shard include list
run: |
cd src/test/java
find . \( -name '*Test.java' -o -name 'Test*.java' \
-o -name '*Tests.java' -o -name '*TestCase.java' \) \
| sed 's|^\./||; s|\.java$||' | LC_ALL=C sort \
> "$GITHUB_WORKSPACE/all-classes.txt"
cd "$GITHUB_WORKSPACE"
python3 -m unittest discover -s .github/ci -p test_partition.py
python3 -m unittest discover -s .github/ci -p test_release_binaries.py
python3 -m unittest discover -s .github/ci -p test_release_images.py
node --test .github/release-tooling/contributors.test.mjs
.github/ci/partition.sh all-classes.txt "$SHARD_TOTAL" "${{ matrix.shard }}" > shard.txt
# An empty includesFile makes surefire fall back to its default includes
# and run the ENTIRE suite into this shard's timeout.
test -s shard.txt
echo "shard ${{ matrix.shard }}/$SHARD_TOTAL: $(wc -l < shard.txt) classes"
# A nightly check (*NightlyIntegrationTest) never runs in the shards: Surefire leaves it out
# unless -Dnightly.checks.enabled=true (pom.xml), so its images are left to nightly-checks.yml
# and the prefetch is handed the shard's classes without it.
- name: Prefetch this shard's Docker images (background)
run: |
grep -v 'NightlyIntegrationTest$' shard.txt > prefetch.txt || true
.github/ci/prefetch-images.sh prefetch.txt || true
- name: Compile
run: ./mvnw test-compile -B
# all-classes.txt is derived from file names, so a test class whose name
# differs from its file would drop out of both it and the shard union
# without the completeness check noticing. The compiled classes are the
# ground truth; fail here if the two lists ever disagree.
- name: Verify shard list matches compiled test classes
run: |
cd target/test-classes
find . \( -name '*Test.class' -o -name 'Test*.class' \
-o -name '*Tests.class' -o -name '*TestCase.class' \) \
! -name '*$*' \
| sed 's|^\./||; s|\.class$||' | LC_ALL=C sort \
> "$RUNNER_TEMP/compiled-classes.txt"
cd "$GITHUB_WORKSPACE"
cmp -s all-classes.txt "$RUNNER_TEMP/compiled-classes.txt" \
|| { echo "::error::test class list from src/test/java differs from target/test-classes:"; diff all-classes.txt "$RUNNER_TEMP/compiled-classes.txt" | head -50; exit 1; }
# Two passes. The plain JUnit classes, which start no Quarkus application, run four at a time
# in a fork of their own; the @QuarkusTest classes share one emulator and run one at a time
# after them. split-concurrent.py says which is which. A pass with no classes is skipped: an
# empty includesFile makes surefire run the whole suite.
# surefire.timeout bounds each pass's reused test fork from its first test set, including
# deadlocks or blocking I/O that ignore JUnit's interrupt: 5 minutes for the plain pass, which
# took at most two on 2026-11-23, and 25 for the Quarkus one. Their sum stays under the
# 35-minute job ceiling with room for compilation and report upload, so a hung pass ends with
# surefire's thread dump instead of the job being cancelled.
- name: Run tests
run: |
python3 .github/ci/split-concurrent.py shard.txt quarkus.txt plain.txt
status=0
if [ -s plain.txt ]; then
./mvnw surefire:test -B \
-Dsurefire.includesFile="$GITHUB_WORKSPACE/plain.txt" \
-Dsurefire.failIfNoTests=true \
-Dsurefire.timeout=300 \
-Dtest.classes.mode=concurrent || status=$?
fi
if [ -s quarkus.txt ]; then
./mvnw surefire:test -B \
-Dsurefire.includesFile="$GITHUB_WORKSPACE/quarkus.txt" \
-Dsurefire.failIfNoTests=true \
-Dsurefire.timeout=1500 || status=$?
fi
exit "$status"
# The prefetch runs in the background past its own step, so its per-image
# results are only complete once the tests are done. A pull still running
# here (after an early exit) has no result line yet, so list it. The
# prefetch is best-effort by design, so a key that no longer matches a
# class, a pin the script could not read, or an image back on ECR Public
# that Docker Hub also carries (only the Lambda runtimes and the EMR
# Serverless images belong there) is an annotation, not a failure.
- name: Image prefetch results
if: always()
run: |
cat prefetch-images.log 2>/dev/null || echo "no prefetch log"
pgrep -af 'docker pull' | sed 's/^/still running: /' || true
grep -E 'stale prefetch key|prefetch skipped' prefetch-images.log 2>/dev/null \
| sed 's/^/::warning title=prefetch-images.sh::/' || true
grep -E '(prefetched|prefetch failed) public\.ecr\.aws/' prefetch-images.log 2>/dev/null \
| grep -vE 'public\.ecr\.aws/(lambda|emr-serverless)/' \
| sed 's/^/::warning title=prefetch-images.sh::pull it from Docker Hub, not ECR Public: /' || true
# Save from main only, and from shard 1 only. Actions caches are ref-scoped:
# a pull_request run's write lands in refs/pull/N/merge where no other PR can
# read it, so every open PR was storing a ~201 MB byte-identical duplicate of
# the copy main already publishes under this exact key — 1.61 GB across 8 PRs
# when measured, against a 10 GB repo budget. PRs restore main's copy instead
# (verified: four sampled PR runs all restored maven-Linux-a80d20aaec, the key
# main holds), and main gets ~15 qualifying pushes a day so it stays fresh.
#
# Trade-off: a PR that edits pom.xml misses this exact key, falls back to the
# restore-keys prefix for the bulk, and re-downloads its delta on each re-run
# rather than caching it. pom.xml changed 21 times in 30 days, so that is a
# small minority of PRs paying a small delta.
#
# Skipped on an exact hit: the key is immutable, so saving it again only fails to reserve it.
- uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
if: >-
always() && matrix.shard == 1 && github.event_name == 'push'
&& steps.maven-cache.outputs.cache-hit != 'true'
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ hashFiles('pom.xml') }}
- uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
if: >-
always() && matrix.shard == 1 && github.event_name == 'push'
&& steps.maven-wrapper-cache.outputs.cache-hit != 'true'
with:
path: ~/.m2/wrapper
key: maven-wrapper-${{ runner.os }}-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
- name: Upload shard manifest and results
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: shard-${{ matrix.shard }}
path: |
shard.txt
all-classes.txt
prefetch-images.log
target/surefire-reports/
if-no-files-found: error
# The enforced completeness gate: fails on any shard failure, any class assigned
# to two shards, or any class assigned to none - checked against the same
# commit's own class list, never a hardcoded count. Intended to become the one
# required status check; its name stays stable across re-sharding.
# Each pom.xml change saves a new ~700 MB Maven cache and leaves the previous one behind
# until GitHub evicts something, so after a push to main this deletes every maven-Linux-*
# entry but the current pom's, once that one exists. Its own job, so only this one holds
# the actions: write token, and only on main.
prune-maven-cache:
name: Prune superseded Maven caches
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
actions: write
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
sparse-checkout: pom.xml
sparse-checkout-cone-mode: false
- name: Delete maven-Linux caches other than the current pom's
env:
GH_TOKEN: ${{ github.token }}
KEEP: maven-Linux-${{ hashFiles('pom.xml') }}
run: |
set -euo pipefail
# main's entries only: a cache another ref saved under the same key must not stand in for
# main's own when deciding whether the older ones can go.
keys=$(gh cache list --repo "$GITHUB_REPOSITORY" --ref refs/heads/main --key maven-Linux- \
--limit 100 --json id,key)
if ! jq -e --arg keep "$KEEP" 'any(.[]; .key == $keep)' <<<"$keys" >/dev/null; then
echo "The current pom's cache ($KEEP) is not saved yet; keeping the older ones."
exit 0
fi
jq -r --arg keep "$KEEP" '.[] | select(.key != $keep) | "\(.id) \(.key)"' <<<"$keys" \
| while read -r id key; do
echo "Deleting superseded cache $key"
gh cache delete "$id" --repo "$GITHUB_REPOSITORY"
done
ci-summary:
name: CI summary
runs-on: ubuntu-latest
timeout-minutes: 10
needs: test
# always() so a failed shard still reaches the partition check and report, but not on a
# draft: there the shards are skipped and this would fail on them. Same condition as the shards.
if: >-
always() && (
github.event_name != 'pull_request' || (
github.event.pull_request.draft == false &&
github.event.pull_request.state != 'closed' &&
github.event.action != 'edited'
)
)
steps:
- name: Fail if any shard failed
if: needs.test.result != 'success'
run: |
echo "shard matrix concluded: ${{ needs.test.result }}"
exit 1
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: shard-*
path: shards
- name: Verify shard partition is disjoint and complete
run: |
set -euo pipefail
ls -d shards/shard-*
ref=$(ls -d shards/shard-* | head -1)
for d in shards/shard-*; do
cmp -s "$ref/all-classes.txt" "$d/all-classes.txt" \
|| { echo "::error::$d computed a different class list than $ref"; exit 1; }
done
dups=$(cat shards/shard-*/shard.txt | LC_ALL=C sort | uniq -d)
[ -z "$dups" ] || { echo "::error::classes assigned to more than one shard:"; echo "$dups"; exit 1; }
cat shards/shard-*/shard.txt | LC_ALL=C sort > union.txt
cmp -s union.txt "$ref/all-classes.txt" \
|| { echo "::error::shard union differs from the full class list:"; diff union.txt "$ref/all-classes.txt" | head -50; exit 1; }
echo "partition verified: $(wc -l < union.txt) classes across $(ls -d shards/shard-* | wc -l) shards"
- name: Test summary
uses: test-summary/action@37b508cfee6d4d080eedd00b5bb240a6a784a6a5 # v2
with:
paths: 'shards/shard-*/target/surefire-reports/TEST-*.xml,shards/shard-*/surefire-reports/TEST-*.xml'