-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.3 KB
/
Copy pathmaven.yml
File metadata and controls
46 lines (41 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Builds and verifies the project (tests, coverage gate, Spotless, Error Prone, SpotBugs).
# See: https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ '21' ]
steps:
- uses: actions/checkout@v7
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v6.0.1
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
- name: Build and verify
run: mvn -B verify
# Aggregation gate: exposes a single, stable status check ("ci-success") that
# is independent of the build matrix. Set this as the required status check in
# branch protection instead of the matrix-dependent "build (21)" context.
ci-success:
name: ci-success
if: always()
needs: build
runs-on: ubuntu-latest
steps:
- name: Verify build job succeeded
run: |
if [ "${{ needs.build.result }}" != "success" ]; then
echo "build job did not succeed: ${{ needs.build.result }}"
exit 1
fi
echo "All required jobs succeeded."