Skip to content

Commit

Permalink
Upgrade github actions cache and use m2 cache for integration testing…
Browse files Browse the repository at this point in the history
… as well
  • Loading branch information
MartinKanters committed Dec 15, 2020
1 parent d8c2cc7 commit 2ef0e5b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down Expand Up @@ -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:
Expand All @@ -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

0 comments on commit 2ef0e5b

Please sign in to comment.