-
Notifications
You must be signed in to change notification settings - Fork 44
57 lines (53 loc) · 1.68 KB
/
Copy pathbuild.yml
File metadata and controls
57 lines (53 loc) · 1.68 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
46
47
48
49
50
51
52
53
54
55
56
57
name: Build & Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Spring Boot 4.x requires Java 21+. The library compiles to Java 21 bytecode via the Gradle
# toolchain; we additionally verify runtime compatibility on Java 25 (current LTS). Both JDKs are
# installed; listing 21 last makes it the default JAVA_HOME, so Gradle runs on (and compiles with)
# Java 21 and discovers Java 25 for the runtime-only testJdk25 task.
- name: Set up JDK 21 (toolchain) and 25 (runtime)
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: |
25
21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6
- name: Build and test (compile + test on Java 21)
run: ./gradlew check --no-daemon
- name: Test on Java 25 (runtime compatibility)
run: ./gradlew testJdk25 --no-daemon
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v7
with:
name: test-reports
path: build/reports/tests/
codeql:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
- uses: github/codeql-action/init@v4
with:
languages: java-kotlin
queries: security-extended
- name: Build
run: ./gradlew compileJava --no-daemon
- uses: github/codeql-action/analyze@v4