Skip to content

Commit

Permalink
Cache only the Maven repository subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
scordio committed Aug 15, 2021
1 parent fc4a618 commit 4cddfb5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/binary-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ jobs:
with:
distribution: 'zulu'
java-version: 11
- name: Cache Maven Repository
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
restore-keys: |
${{ runner.os }}-maven-
- name: (`main` only) Compare with the latest release
if: github.base_ref == null
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/cross-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Cache Maven Repository
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
restore-keys: |
${{ runner.os }}-maven-
- name: Test
run: ./mvnw -V --no-transfer-progress -e verify javadoc:javadoc
14 changes: 8 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ jobs:
with:
distribution: 'zulu'
java-version: 11
- name: Cache Maven Repository
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
restore-keys: |
${{ runner.os }}-maven-
- name: Test
run: ./mvnw -V --no-transfer-progress -e verify javadoc:javadoc

Expand All @@ -40,12 +41,13 @@ jobs:
with:
distribution: 'zulu'
java-version: 11
- name: Cache Maven Repository
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
restore-keys: |
${{ runner.os }}-maven-
- name: Test with Sonar
run: >
./mvnw -V --no-transfer-progress -e verify javadoc:javadoc sonar:sonar
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pitest-receive-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
restore-keys: |
${{ runner.os }}-maven-
- name: Setup Java
uses: actions/setup-java@v2
with:
Expand Down

0 comments on commit 4cddfb5

Please sign in to comment.