name: develop status

on:
  push:
    branches:
      - develop

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        jdk: [1.8, 15]

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK
      uses: actions/setup-java@v1
      with:
        java-version: ${{ matrix.jdk }}
    - name: Cache local Maven repository
      uses: actions/cache@v2
      with:
        path: ~/.m2/repository
        key: ${{ runner.os }}-jdk${{ matrix.jdk }}-maven-${{ hashFiles('**/pom.xml') }}
        restore-keys: |
          ${{ runner.os }}-jdk${{ matrix.jdk }}-maven-
    - name: Build
      run: mvn -B -U clean install -Pquick,\!formatting
    - name: Verify
      run: mvn -B verify -P\!skipSlowTests,\!formatting -Dmaven.javadoc.skip=true -Djapicmp.skip -Denforcer.skip=true -Danimal.sniffer.skip=true
