File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 40
40
restore-keys : |
41
41
${{ runner.os }}-maven-
42
42
- name : Cache SonarCloud packages
43
+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
44
+ env :
45
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
43
46
44
47
if : matrix.java_version == '11'
45
48
with :
49
52
- name : Run tests
50
53
run : ./mvnw -V -B -ntp -ff verify jacoco:report
51
54
- name : Static Analysis (Sonar)
52
- if : matrix.java_version == '11'
55
+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
53
56
env :
54
57
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55
58
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Original file line number Diff line number Diff line change @@ -34,15 +34,17 @@ jobs:
34
34
${{ runner.os }}-maven-
35
35
- name : Cache SonarCloud packages
36
36
37
- if : matrix.java_version == '11'
37
+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
38
+ env :
39
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
38
40
with :
39
41
path : ~/.sonar/cache
40
42
key : ${{ runner.os }}-sonar
41
43
restore-keys : ${{ runner.os }}-sonar
42
44
- name : Run tests
43
45
run : ./mvnw -V -B -ntp -ff verify
44
46
- name : Static Analysis (Sonar)
45
- if : matrix.java_version == '11'
47
+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
46
48
env :
47
49
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
50
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments