Add Spring Boot 3.2 support #121
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build and Test" | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
matrix_build: | |
name: "Matrix Build" | |
runs-on: | |
- ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 100 | |
matrix: | |
spring_boot_version: | |
- 3.2.3 | |
- 3.1.2 | |
- 2.7.13 | |
env: | |
SPRING_BOOT_VERSION: ${{ matrix.spring_boot_version }} | |
RUNS_IN_CI: "true" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: "Retrieve gradle settings" | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle | |
key: gradle-v2-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', '**/*.gradle*') }} | |
- name: "Assemble jar" | |
run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew assemble --console=plain --info --stacktrace | |
- name: "Run tests" | |
run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew -Dspring.profiles.include=continuous-integration check --console=plain --info --stacktrace | |
- name: "Test if publishing works" | |
run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew publishToMavenLocal --console=plain --info --stacktrace | |
- name: "Publish Test Report" | |
uses: mikepenz/action-junit-report@v3 | |
if: always() | |
with: | |
report_paths: '**/build/test-results/**/*.xml' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
require_tests: true | |
- name: Publish checkstyle report | |
if: failure() | |
uses: jwgmeligmeyling/checkstyle-github-action@master | |
with: | |
path: '**/build/reports/**/*.xml' | |
- name: Publish spotbugs report | |
if: failure() | |
uses: jwgmeligmeyling/spotbugs-github-action@master | |
with: | |
path: '**/build/reports/**/*.xml' | |
build: | |
name: "Build and Test" | |
runs-on: | |
- ubuntu-latest | |
needs: matrix_build | |
steps: | |
# Needed hacks to properly fail the build when one matrix build fails. | |
- name: Do something so that GHA is happy | |
run: echo "Be happy!" | |
- name: Verify matrix jobs succeeded | |
if: ${{ needs.matrix_build.result != 'success' }} | |
run: exit 1 | |
- name: "Install packages" | |
run: sudo apt-get update && sudo apt-get install -y git unzip | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-home-cache-cleanup: true | |
# Comment out when you are upgrading gradle in a branch and doing tons of commits you would need to test. | |
# cache-read-only: false | |
- name: "Tag release" | |
if: github.ref == 'refs/heads/master' | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: tagRelease --console=plain --info --stacktrace |