name: Java CI

on:
  push:
    branches:
    - candidate
  pull_request:
    branches:
    - candidate

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build with Gradle
      env:
        NODE_OPTIONS: '--max-old-space-size=8192'
      run: ./gradlew distZip

name: Java CI

on:
  push:
    branches:
    - candidate
  pull_request:
    branches:
    - candidate

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1

    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8

    - uses: actions/cache@v1
      with:
        path: ~/.gradle/caches
        key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
        restore-keys: |
          ${{ runner.os }}-gradle-

    - name: Get yarn cache
      id: yarn-cache
      run: echo "::set-output name=dir::$(./gradlew yarn_cache_dir)"

    - uses: actions/cache@v1
      with:
        path: ${{ steps.yarn-cache.outputs.dir }}
        key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
        restore-keys: |
          ${{ runner.os }}-yarn-

    - name: Build with Gradle
      env:
        NODE_OPTIONS: '--max-old-space-size=8192'
      run: ./gradlew distZip

Add caches for yarn and gradle to github actions
Add caches for yarn and gradle to github actions
