Files
floci/.github/workflows/ci.yml
T
dependabot[bot] 52985a2f19 build(deps): bump the actions-minor-patch group with 8 updates (#4867)
Bumps the actions-minor-patch group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [graalvm/setup-graalvm](https://github.com/graalvm/setup-graalvm) | `1.6.4` | `1.6.6` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.0` | `7.0.1` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `8.0.0` | `8.0.1` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `4.3.0` | `4.4.1` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `7.3.0` | `7.4.0` |
| [actions/setup-java](https://github.com/actions/setup-java) | `6.0.0` | `6.0.1` |
| [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) | `6.2.3` | `6.3.0` |
| [aws-actions/amazon-ecr-login](https://github.com/aws-actions/amazon-ecr-login) | `2.0.1` | `2.1.7` |


Updates `graalvm/setup-graalvm` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/graalvm/setup-graalvm/releases)
- [Commits](https://github.com/graalvm/setup-graalvm/compare/5298d94fb55a4f185c602eeac5de1b553882abe2...0426e2e191540e8514dff98dc52a5f5146a2a276)

Updates `actions/upload-artifact` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v7...043fb46d1a93c77aae656e7c1c64a875d1fc6a0a)

Updates `actions/download-artifact` from 8.0.0 to 8.0.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v8...3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c)

Updates `docker/setup-buildx-action` from 4.3.0 to 4.4.1
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/37fe631027851001ddb9b187196cc803df7f5f0e...f87e5991a6d7451dcb8d9637bfbc97413f497069)

Updates `docker/build-push-action` from 7.3.0 to 7.4.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/53b7df96c91f9c12dcc8a07bcb9ccacbed38856a...c3c9e263c25d99ce0380d002d59b67737d91b0dc)

Updates `actions/setup-java` from 6.0.0 to 6.0.1
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/dd06d9cba3e5552c54d9f8ea23572deb30010f7c...de7274f081f381c8f8158605e0321c36c376e2e6)

Updates `aws-actions/configure-aws-credentials` from 6.2.3 to 6.3.0
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/e6de054238d6b7531b4efff3b6587d9aade6a06c...e1253824e5c10ff9df46874f81ed3ec929e19cfd)

Updates `aws-actions/amazon-ecr-login` from 2.0.1 to 2.1.7
- [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/062b18b96a7aff071d4dc91bc00c4c1a7945b076...03f1aad4c6c7ffd436567f42f9384779290529bd)

---
updated-dependencies:
- dependency-name: graalvm/setup-graalvm
  dependency-version: 1.6.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: docker/build-push-action
  dependency-version: 7.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: actions/setup-java
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: aws-actions/configure-aws-credentials
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: aws-actions/amazon-ecr-login
  dependency-version: 2.1.7
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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-10-08 22:18:24 -05:00

223 lines
10 KiB
YAML

name: CI
on:
push:
branches:
- main
paths:
- 'src/**'
- 'pom.xml'
- '.github/ci/**'
- '.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/workflows/ci.yml'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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: 4
jobs:
test:
name: Build and Test (shard ${{ matrix.shard }})
runs-on: ubuntu-latest
# Shards run 10m49s to 13m47s, so 15 left the slowest about a minute of margin and a slow
# runner spent it. This is a runaway-job kill switch, not a budget: Actions bills the minutes a
# job actually uses, so a higher ceiling costs nothing until something hangs.
timeout-minutes: 20
# 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]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
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
# all four shards would race the same save key: one wins, three spend
# post-job time reserving-then-failing plus redundant multi-hundred-MB uploads.
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ hashFiles('pom.xml') }}
restore-keys: |
maven-${{ runner.os }}-
# 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"
.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"
- name: Prefetch this shard's Docker images (background)
run: .github/ci/prefetch-images.sh shard.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; }
- name: Run tests
run: >
./mvnw surefire:test -B
-Dsurefire.includesFile="$GITHUB_WORKSPACE/shard.txt"
-Dsurefire.failIfNoTests=true
# 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 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/' \
| sed 's/^/::warning title=prefetch-images.sh::not a Lambda runtime, pull it from Docker Hub: /' || 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.
- uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
if: always() && matrix.shard == 1 && github.event_name == 'push'
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ hashFiles('pom.xml') }}
- name: Upload shard manifest and results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
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.
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@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
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'