This repository has been archived by the owner on Sep 8, 2024. It is now read-only.
Fix cache setup #50
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 | |
on: [pull_request, push] | |
jobs: | |
gradle: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
# Only write to the cache for builds on the 'master' branch. | |
# Builds on other branches will only read existing entries from the cache. | |
cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
- name: Execute Gradle build | |
run: ./gradlew build | |
test-matrix: | |
needs: [gradle] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Test around 6.6, 6.2, 6.0 and 5.2 breaking points, and the lower and upper boundaries | |
# Version 6.6 is omitted as it's already tested above | |
gradle: ["8.0.1", "7.4.2", "6.3", "6.2.2", "6.1.1", "6.0", "5.6.4", "5.3.1", "5.2.1", "5.1.1", "5.0"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
# Only write to the cache for builds on the 'main' branch. | |
# Builds on other branches will only read existing entries from the cache. | |
cache-read-only: ${{ github.ref != 'refs/heads/master' }} | |
- name: Execute Gradle build | |
run: ./gradlew functionalTest -Ptest.gradle-version=${{ matrix.gradle }} |