Skip to content

Define GitHub Actions workflows and update Gradle (#208) #16

Define GitHub Actions workflows and update Gradle (#208)

Define GitHub Actions workflows and update Gradle (#208) #16

Workflow file for this run

name: build and test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
validation:
name: "Gradle Wrapper Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
build:
name: "Compile against JDKs and OSes"
needs: [ validation ]
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
java: [ 8, 11, 17, 21, 23 ]
exclude:
- java: 8
os: macos-latest
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Execute Gradle build
run: ./gradlew build
test:
name: "Test"
needs: [ build ]
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17, 21, 23 ]
fasterxmlVersion: [ 2.8.11, 2.9.10, 2.10.4, 2.11.3, 2.12.3, 2.13.4, 2.14.1 ]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: gradle
- run: |
./gradlew clean check --refresh-dependencies -PfasterxmlVersion=${{ matrix.fasterxmlVersion }}
./gradlew codeCoverageReport