name: Compatibility Build

on:
  workflow_dispatch:
  schedule:
    - cron: '5 6 * * *'

jobs:
  integration:
    strategy:
      matrix:
        version: ['3.0.13', '3.0.14-SNAPSHOT', '3.1.13-SNAPSHOT', '3.2.5', '3.2.6-SNAPSHOT']
    name: Build against Boot ${{ matrix.version }}
    runs-on: ubuntu-latest

    steps:

    - name: Check out sources
      uses: actions/checkout@v4

    - name: Set up JDK 17
      uses: actions/setup-java@v3
      with:
        distribution: 'temurin'
        java-version: 17
        cache: 'maven'

    - name: Build with Maven
      run: ./mvnw -B -Pwith-preview-repos -Dspring-boot.version=${{ matrix.version }}
