Skip to content

Commit

Permalink
Sonarcloud -.-
Browse files Browse the repository at this point in the history
  • Loading branch information
hypfvieh committed Jul 13, 2024
1 parent 02be7eb commit e28f56b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven_jdk17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
run: |
dbus-daemon --session --fork --address unix:path=/tmp/dbustest,guid=$(echo $RANDOM | md5sum | cut -d ' ' -f 1)
export DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbustest
mvn -B verify --file pom.xml -P sonarcloud-with-tests
mvn -B verify --file pom.xml
2 changes: 1 addition & 1 deletion .github/workflows/maven_jdk21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
run: |
dbus-daemon --session --fork --address unix:path=/tmp/dbustest,guid=$(echo $RANDOM | md5sum | cut -d ' ' -f 1)
export DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbustest
mvn -B verify --file pom.xml -P sonarcloud-with-tests
mvn -B verify --file pom.xml
32 changes: 32 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test - SonarCloud Scan

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
cache-dependency-path: |
dbus-java-core/pom.xml
dbus-java-examples/pom.xml
dbus-java-osgi/pom.xml
dbus-java-tests/pom.xml
dbus-java-transport-jnr-unixsocket/pom.xml
dbus-java-transport-junixsocket/pom.xml
dbus-java-transport-native-unixsocket/pom.xml
dbus-java-transport-tcp/pom.xml
dbus-java-utils/pom.xml
- name: SonarCloud Scan
run: mvn -B clean verify -Psonarcloud -Dsonar.login=${{ secrets.SONAR_TOKEN }}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@
<check.skip-sonar>false</check.skip-sonar>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>hypfvieh</sonar.organization>
<sonar.projectKey>com.github.hypfvieh:dbus-java-parent</sonar.projectKey>
<sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>

<maven.test.skip>true</maven.test.skip>
<skipTests>true</skipTests>
Expand Down Expand Up @@ -678,7 +678,7 @@
<check.skip-sonar>false</check.skip-sonar>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>hypfvieh</sonar.organization>
<sonar.projectKey>com.github.hypfvieh:dbus-java-parent</sonar.projectKey>
<sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>>
</properties>
<build>
<plugins>
Expand Down

0 comments on commit e28f56b

Please sign in to comment.