From a77817a08cadc82b3b76980676ff748235abf18c Mon Sep 17 00:00:00 2001 From: Mike Drob Date: Tue, 22 Sep 2020 13:08:24 -0500 Subject: [PATCH] Use github actions cache (#1910) --- .github/workflows/docker-test.yml | 8 ++++++++ .github/workflows/gradle-precommit.yml | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index 6e9ccc8f394..1cf2edf6a15 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -26,6 +26,14 @@ jobs: java-version: 11 - name: Grant execute permission for gradlew run: chmod +x gradlew + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + key: ${{ runner.os }}-gradle-docker-${{ hashFiles('versions.lock') }} + restore-keys: | + ${{ runner.os }}-gradle-docker- + ${{ runner.os }}-gradle- - name: Build Docker image with Gradle run: ./gradlew solr:docker:docker - name: Run tests on Docker image diff --git a/.github/workflows/gradle-precommit.yml b/.github/workflows/gradle-precommit.yml index c38d65ad4dc..ff275b853b5 100644 --- a/.github/workflows/gradle-precommit.yml +++ b/.github/workflows/gradle-precommit.yml @@ -14,12 +14,25 @@ jobs: steps: # Setup - uses: actions/checkout@v2 + - name: Set up JDK 11 uses: actions/setup-java@v1 with: java-version: 11 + - name: Grant execute permission for gradlew run: chmod +x gradlew + + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + key: ${{ runner.os }}-gradle-precommit-${{ hashFiles('versions.lock') }} + restore-keys: | + ${{ runner.os }}-gradle-precommit- + ${{ runner.os }}-gradle- + - name: Build with Gradle run: ./gradlew precommit + - uses: gradle/wrapper-validation-action@v1