name: Java CI

on:
  push:
    branches:
    - 'v4'
    - 'v5'
    - 'legacy/1.8-1.12'
  pull_request:
    branches:
    - 'v4'
    - 'v5'
    - 'legacy/1.8-1.12'
 
jobs:
  test:
    runs-on: ubuntu-18.04

    steps:
    - name: Checkout
      uses: actions/checkout@v2.0.0
    - name: Setup Java JDK 1.8
      uses: actions/setup-java@v1.3.0
      with:
        java-version: 1.8
    - name: Gradle Wrapper Validation
      uses: gradle/wrapper-validation-action@v1
    - name: Test with Gradle
      run: ./gradlew clean build
