name: CI

on: [push]

jobs:
  build:
    name: CI

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Set up JDK 11
      uses: actions/setup-java@v1
      with:
        java-version: 11
    - name: Build
      run: mvn compile --file pom.xml
    - name: Test
      run: mvn test --file pom.xml
    - name: Package
      run: mvn -Prelease -DskipTests package --file pom.xml

name: CI

on: [push]

jobs:
  build:
    name: CI

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Set up JDK 11
      uses: actions/setup-java@v1
      with:
        java-version: 11

    - name: Cache local Maven repository
      uses: actions/cache@v2
      with:
        path: ~/.m2/repository
        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
        restore-keys: |
          ${{ runner.os }}-maven-

    - name: Build
      run: mvn compile --file pom.xml
    - name: Test
      run: mvn test --file pom.xml
    - name: Package
      run: mvn -Prelease -DskipTests package --file pom.xml

Add caching to CI workflow
build: Add caching to CI workflow
