Skip to content

Commit 24902ed

Browse files
committed
Merge remote-tracking branch 'origin/update-from-template' into develop
2 parents e9c16fe + 7f199f6 commit 24902ed

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

.github/workflows/sonar.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,22 @@ env:
2424
SONARCLOUD_HOST: https://sonarcloud.io
2525

2626
jobs:
27-
sonar:
28-
name: SonarCloud Scan
27+
token-check:
2928
runs-on: ubuntu-latest
30-
# Dependabot PRs have no access to secrets (SONAR_TOKEN) -> Ignore them
31-
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'dependabot/') }}
29+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) }}
30+
outputs:
31+
hasToken: ${{ steps.check-token.outputs.has }}
32+
steps:
33+
- id: check-token
34+
run: |
35+
[ -z $SONAR_TOKEN ] && echo "has=false" || echo "has=true" >> "$GITHUB_OUTPUT"
36+
env:
37+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
38+
39+
sonar-scan:
40+
runs-on: ubuntu-latest
41+
needs: token-check
42+
if: ${{ needs.token-check.outputs.hasToken }}
3243
steps:
3344
- uses: actions/checkout@v4
3445
with:
@@ -55,7 +66,11 @@ jobs:
5566
restore-keys: ${{ runner.os }}-gradle
5667

5768
- name: Build
58-
run: ./gradlew build sonarqube --info -Dsonar.projectKey=${{ env.SONARCLOUD_ORG }}_${{ github.event.repository.name }} -Dsonar.organization=${{ env.SONARCLOUD_ORG }} -Dsonar.host.url=${{ env.SONARCLOUD_HOST }}
69+
run: |
70+
./gradlew build sonarqube --info \
71+
-Dsonar.projectKey=${{ env.SONARCLOUD_ORG }}_${{ github.event.repository.name }} \
72+
-Dsonar.organization=${{ env.SONARCLOUD_ORG }} \
73+
-Dsonar.host.url=${{ env.SONARCLOUD_HOST }}
5974
env:
6075
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
6176
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
}
88

99
ext {
10-
checkstyleVersion = '10.16.0'
10+
checkstyleVersion = '10.17.0'
1111
}
1212

1313
def properties(String key) {
@@ -44,7 +44,7 @@ dependencies {
4444
testImplementation platform('org.junit:junit-bom:5.10.2'),
4545
'org.junit.jupiter:junit-jupiter',
4646
'org.junit.jupiter:junit-jupiter-engine',
47-
'org.assertj:assertj-core:3.25.3'
47+
'org.assertj:assertj-core:3.26.0'
4848
testRuntimeOnly("org.junit.platform:junit-platform-launcher") {
4949
because("Only needed to run tests in a version of IntelliJ IDEA that bundles older versions")
5050
}

0 commit comments

Comments
 (0)