From 6f7455d01245962816b9a9f7795a18c8585c68cc Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 17 Apr 2024 13:11:13 +0300 Subject: [PATCH] Disable sonar for dependabot (#587) * Disable sonar for Dependabot PRs * Apply spotless * Rename sonar step in the build workflow --- .github/workflows/build.yml | 15 ++++++++++----- .../std/marshal/config/DvOrdinalConfigTest.java | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc6757315..1568b01da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: with: fetch-depth: 0 - - name: Setup Java + - name: Setup - Java 17 uses: actions/setup-java@v4 with: distribution: 'temurin' @@ -24,14 +24,19 @@ jobs: cache: 'maven' - - name: Spotless - run: mvn -B spotless:apply + - name: Spotless - Check + run: mvn -B spotless:check - - name: Run Checks + - name: Maven - Verify, Jacoco and Package + run: mvn --batch-mode -U verify test jacoco:report-aggregate package + + - name: Sonar - Analyze + # Dependabot has no access to the SONAR_TOKEN secret, so we need to skip sonar. + if: ${{ github.actor != 'dependabot[bot]' }} env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | - mvn clean verify test jacoco:report-aggregate package sonar:sonar \ + mvn --batch-mode sonar:sonar \ -Dsonar.host.url=https://sonarcloud.io \ -Dsonar.organization=ehrbase \ -Dsonar.projectKey=ehrbase_openEHR_SDK \ diff --git a/serialisation/src/test/java/org/ehrbase/openehr/sdk/serialisation/flatencoding/std/marshal/config/DvOrdinalConfigTest.java b/serialisation/src/test/java/org/ehrbase/openehr/sdk/serialisation/flatencoding/std/marshal/config/DvOrdinalConfigTest.java index 44b6b62b5..b0352f999 100644 --- a/serialisation/src/test/java/org/ehrbase/openehr/sdk/serialisation/flatencoding/std/marshal/config/DvOrdinalConfigTest.java +++ b/serialisation/src/test/java/org/ehrbase/openehr/sdk/serialisation/flatencoding/std/marshal/config/DvOrdinalConfigTest.java @@ -43,7 +43,8 @@ void buildChildValuesOrdinalOnlySymbolNullSafe() { void buildChildValuesWithSymbol() { Map childValues = buildChildValues( - "some_other/current_activity/ordinal", new DvOrdinal(42L, new DvCodedText("lorem ipsum", "PWVGUTHASM"))); + "some_other/current_activity/ordinal", + new DvOrdinal(42L, new DvCodedText("lorem ipsum", "PWVGUTHASM"))); assertThat(childValues) .hasSize(3) .containsEntry("some_other/current_activity/ordinal|ordinal", 42L)