Skip to content

Commit

Permalink
Disable sonar for dependabot (#587)
Browse files Browse the repository at this point in the history
* Disable sonar for Dependabot PRs

* Apply spotless

* Rename sonar step in the build workflow
  • Loading branch information
vidi42 authored Apr 17, 2024
1 parent 5cbcd53 commit 6f7455d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,27 @@ jobs:
with:
fetch-depth: 0

- name: Setup Java
- name: Setup - Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ void buildChildValuesOrdinalOnlySymbolNullSafe() {
void buildChildValuesWithSymbol() {

Map<String, Object> 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)
Expand Down

0 comments on commit 6f7455d

Please sign in to comment.