1515 - name : Set up JDK ${{ matrix.java }}
1616 uses : actions/setup-java@v3
1717 with :
18+ distribution : ' temurin'
1819 java-version : ${{ matrix.java }}
19- - name : Cache Maven packages
20- uses : actions/cache@v3
21- with :
22- path : ~/.m2
23- key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
24- restore-keys : ${{ runner.os }}-m2
20+ cache : ' maven'
2521 - name : Build with Maven
2622 run : mvn test jacoco:report --file pom.xml -B
2723
4238 - name : Set up JDK ${{ matrix.java }}
4339 uses : actions/setup-java@v3
4440 with :
41+ distribution : ' temurin'
4542 java-version : ${{ matrix.java }}
46- - name : Cache Maven packages
47- uses : actions/cache@v3
48- with :
49- path : ~/.m2
50- key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
51- restore-keys : ${{ runner.os }}-m2
43+ cache : ' maven'
5244 - name : Build with Maven
5345 run : mvn package --file pom.xml -B
5446
@@ -62,19 +54,15 @@ jobs:
6254 - name : Set up JDK 17
6355 uses : actions/setup-java@v3
6456 with :
57+ distribution : ' temurin'
6558 java-version : 17
59+ cache : ' maven'
6660 - name : Cache SonarCloud packages
6761 uses : actions/cache@v3
6862 with :
6963 path : ~/.sonar/cache
7064 key : ${{ runner.os }}-sonar
7165 restore-keys : ${{ runner.os }}-sonar
72- - name : Cache Maven packages
73- uses : actions/cache@v3
74- with :
75- path : ~/.m2
76- key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
77- restore-keys : ${{ runner.os }}-m2
7866 - name : Build and analyze
7967 env :
8068 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments