Skip to content

Commit 08dc30e

Browse files
committed
Use full clone for better SonarCloud analysis results
1 parent d9fff61 commit 08dc30e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/maven.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,18 @@ jobs:
2525
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
2626
steps:
2727
- uses: actions/checkout@v2.4.0
28+
with:
29+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
2830
- name: Set up JDK
2931
uses: actions/setup-java@v2
3032
with:
3133
distribution: 'zulu'
3234
java-version: ${{ matrix.java_version }}
35+
cache: 'maven'
3336
# Value of the distributionManagement/repository/id field of the pom.xml
3437
server-id: sonatype-nexus-snapshots
3538
server-username: OSS_USERNAME
3639
server-password: OSS_PASSWORD
37-
- uses: actions/cache@v2.1.7
38-
with:
39-
path: ~/.m2/repository
40-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
41-
restore-keys: |
42-
${{ runner.os }}-maven-
4340
- name: Cache SonarCloud packages
4441
uses: actions/cache@v2.1.7
4542
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}

0 commit comments

Comments
 (0)