name: CI

on:
  pull_request:
    branches:
      - master
  push:
    branches:
      - master

permissions:
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 2
    strategy:
      matrix:
        java: [ '8', '11', '17', '21', '22' ]
    steps:
    - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b #v4.1.4
    - name: Set up JDK
      uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
      with:
        java-version: ${{ matrix.java }}
        distribution: 'temurin'
    - name: Build
      run: ./mvnw --no-transfer-progress -B clean verify -Pfull,all --file pom.xml
