Skip to content

test(spring): [Sample Tests 42] Run each Spring Boot matrix version as its own Gradle task #6429

test(spring): [Sample Tests 42] Run each Spring Boot matrix version as its own Gradle task

test(spring): [Sample Tests 42] Run each Spring Boot matrix version as its own Gradle task #6429

name: Spring Boot 2.x Matrix
on:
push:
branches:
- main
pull_request:
paths-ignore:
- '*android*/**'
- 'sentry-compose/**'
- 'sentry-samples/sentry-samples-android/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
spring-boot-2-matrix:
timeout-minutes: 45
runs-on: ubuntu-latest
name: Spring Boot 2.x
env:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
steps:
- name: Checkout Repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: 'recursive'
- name: Set up Java
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: 'temurin'
java-version: '21'
# Workaround for https://github.com/gradle/actions/issues/21 to use config cache
- name: Cache buildSrc
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: buildSrc/build
key: build-logic-${{ hashFiles('buildSrc/src/**', 'buildSrc/build.gradle.kts','buildSrc/settings.gradle.kts') }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Test integration suites
# Runs every version even after one fails, as separate jobs per version would.
run: ./gradlew allIntegrationTestsBoot2 --continue
- name: Upload test results
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: test-results-springboot-2
path: |
**/build/reports/*
**/build/test-results/**/*.xml
- name: Test Report
uses: phoenix-actions/test-reporting@7317eea6e13c47348dd0bb318669485157c518d6 # pin@v16
if: always()
with:
name: JUnit Spring Boot 2.x
path: |
**/build/test-results/**/*.xml
reporter: java-junit
output-to: step-summary
fail-on-error: false