Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ on:
# Deliberately NOT filtered by path. "Build and Test (JDK 17)" is a required
# status check in .asf.yaml, and a workflow skipped by path filtering never
# reports its checks - they stay Pending and the pull request can never be
# merged. The build job is skipped by condition instead (see `changes` below),
# which does report, as "skipped", and satisfies the requirement.
# merged. The build job always runs instead, and its steps are skipped by
# condition when only .claude/ changed (see `changes` below).
pull_request:
push:
branches:
Expand Down Expand Up @@ -77,7 +77,12 @@ jobs:
build:
name: Build and Test (JDK ${{ matrix.java }})${{ matrix.profile == '-Pjakartaee11' && ' (Jakarta EE 11 + Spring 7)' || matrix.profile }}
needs: changes
if: needs.changes.outputs.code == 'true'
# No job-level `if:` here on purpose. A matrix job whose condition is false
# is skipped *before* the matrix expands, so it reports a single check run
# named after the raw `${{ matrix.* }}` template - never "Build and Test
# (JDK 17)". The required context then never reports at all and the pull
# request stays blocked. Gate the steps instead: the matrix expands, every
# expected check reports success, and nothing is built.
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -95,20 +100,23 @@ jobs:
profile: '-Pjakartaee11'
steps:
- name: Checkout code
if: needs.changes.outputs.code == 'true'
uses: actions/checkout@v7
- name: Setup Java ${{ matrix.java }}
if: needs.changes.outputs.code == 'true'
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Maven Verify on Java ${{ matrix.java }}${{ matrix.profile == '-Pjakartaee11' && ' (Jakarta EE 11 + Spring 7)' || matrix.profile }}
if: needs.changes.outputs.code == 'true'
run: mvn -B -V -DskipAssembly verify ${{ matrix.profile }} --no-transfer-progress

- name: Test Summary ${{ matrix.java }} ${{ matrix.profile }}
uses: mikepenz/action-junit-report@d9f48fc87bc235f7e214acf696ca5abc0a986f16 #v6.4.2
continue-on-error: true
if: always()
if: always() && needs.changes.outputs.code == 'true'
with:
annotate_only: true # forked repo cannot write to checks so just do annotations
report_paths: |
Expand Down
Loading