From 2ef0e5bacc04dd5b77a1bd2d6fc086fbc4bdf3b8 Mon Sep 17 00:00:00 2001 From: Martin Kanters Date: Sat, 5 Dec 2020 17:10:35 +0100 Subject: [PATCH] Upgrade github actions cache and use m2 cache for integration testing as well --- .github/workflows/maven.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 2af8566ae42..afa260b3b6c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -32,8 +32,8 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Set up cache for ~./m2/repository - uses: actions/cache@v1 + - name: Set up cache for ~/.m2/repository + uses: actions/cache@v2 with: path: ~/.m2/repository key: maven-${{ matrix.os }}-${{ hashFiles('**/pom.xml') }} @@ -110,6 +110,14 @@ jobs: path: maven-integration-testing/ ref: ${{ env.REPO_BRANCH }} + - name: Set up cache for ~/.m2/repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: it-m2-repo-${{ matrix.os }}-${{ hashFiles('maven-integration-testing/**/pom.xml') }} + restore-keys: | + it-m2-repo-${{ matrix.os }}- + - name: Download built Maven uses: actions/download-artifact@v2 with: @@ -129,4 +137,4 @@ jobs: - name: Running integration tests shell: bash - run: mvn install -e -B -V -Prun-its,embedded -Dmaven.repo.local=$GITHUB_WORKSPACE/repo/ -DmavenDistro="$GITHUB_WORKSPACE/built-maven/apache-maven-bin.zip" -DwrapperDistroDir="$GITHUB_WORKSPACE/built-maven/" -DmavenWrapper="$GITHUB_WORKSPACE/built-maven-wrapper/maven-wrapper.jar" -f maven-integration-testing/pom.xml + run: mvn install -e -B -V -Prun-its,embedded -Dmaven.repo.local="$HOME/.m2/repository" -DmavenDistro="$GITHUB_WORKSPACE/built-maven/apache-maven-bin.zip" -DwrapperDistroDir="$GITHUB_WORKSPACE/built-maven/" -DmavenWrapper="$GITHUB_WORKSPACE/built-maven-wrapper/maven-wrapper.jar" -f maven-integration-testing/pom.xml