diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fd523d1..e3e0041 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,41 +9,27 @@ on: - '*' jobs: - check-gradle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: 'Set up JDK' - uses: actions/setup-java@v4 - with: - java-version: 8 - distribution: temurin - - name: 'Init Gradle Build Action' - uses: gradle/gradle-build-action@v2 - with: - # cache options only count for the first invocation - cache-read-only: ${{ github.ref != 'refs/heads/master' }} - arguments: --version - - name: 'Check Spock' - uses: gradle/gradle-build-action@v2 - with: - arguments: check check-maven: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-latest, windows-latest, macOS-latest ] + javaVersion: [ 8, 21 ] + javaDist: [ temurin ] + runs-on: { { matrix.os } } steps: - uses: actions/checkout@v4 - name: Cache local Maven repository uses: actions/cache@v4 with: path: ~/.m2/repository - key: test-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: test-${{ matrix.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | - test-${{ runner.os }}-maven- - - name: 'Set up JDK' + test-${{ matrix.os }}-maven- + - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 8 - distribution: temurin + java-version: ${{ matrix.javaVersion }} + distribution: ${{ matrix.javaDist }} - name: 'Check Spock' run: | ./mvnw -V -B verify