Skip to content

Commit

Permalink
Java GitHub Action now has caching built in
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman committed Nov 29, 2021
1 parent cbe8548 commit b33e934
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Cached .m2
uses: actions/cache@v2.1.6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
cache: 'maven'
- name: Maven Install (skipTests)
env:
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
Expand All @@ -54,12 +48,7 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- uses: actions/cache@v2.1.6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
cache: 'maven'
- name: Maven Site
run: mvn -B clean site -D enable-ci --file pom.xml
test:
Expand All @@ -77,12 +66,7 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- uses: actions/cache@v2.1.6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
cache: 'maven'
# JDK 8
- name: Maven Install without Code Coverage
if: matrix.os == 'windows' && startsWith(matrix.java, '8')
Expand Down

0 comments on commit b33e934

Please sign in to comment.