Skip to content

Spring Boot update

Spring Boot update #15

name: Build and test
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'adopt'
- name: Cache local Maven repository
uses: actions/cache@v5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn --batch-mode -DskipTests package
- name: Run tests
run: mvn --batch-mode -Dmaven.test.failure.ignore=true test
- name: Test Report
uses: dorny/test-reporter@v3
if: ${{ !cancelled() }}
with:
name: JUnit Test Report
path: target/surefire-reports/*.xml
reporter: java-junit
- name: Upload test results
uses: actions/upload-artifact@v7 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
path: target/surefire-reports/*.xml