Skip to content

Commit 1d50ce7

Browse files
committed
sonarcloud
1 parent faff9e3 commit 1d50ce7

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.github/workflows/maven.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,55 @@ jobs:
173173
run: mvn -version
174174
- name: Test
175175
run: mvn --no-transfer-progress test -Dadb.jackson.version=${{matrix.jackson-version}}
176+
177+
sonar:
178+
timeout-minutes: 10
179+
runs-on: ubuntu-latest
180+
181+
strategy:
182+
fail-fast: false
183+
matrix:
184+
docker-img:
185+
- docker.io/arangodb/enterprise:3.9.1
186+
topology:
187+
- cluster
188+
db-ext-names:
189+
- false
190+
java-version:
191+
- 11
192+
193+
steps:
194+
- uses: actions/checkout@v2
195+
- name: Set up JDK
196+
uses: actions/setup-java@v2
197+
with:
198+
java-version: ${{matrix.java-version}}
199+
distribution: 'adopt'
200+
cache: maven
201+
- name: Start Database
202+
run: ./docker/start_db.sh
203+
env:
204+
ARANGO_LICENSE_KEY: ${{ secrets.ARANGO_LICENSE_KEY }}
205+
STARTER_MODE: ${{matrix.topology}}
206+
DOCKER_IMAGE: ${{matrix.docker-img}}
207+
DATABASE_EXTENDED_NAMES: ${{matrix.db-ext-names}}
208+
- name: Info
209+
run: mvn -version
210+
- name: Cache SonarCloud packages
211+
uses: actions/cache@v1
212+
with:
213+
path: ~/.sonar/cache
214+
key: ${{ runner.os }}-sonar
215+
restore-keys: ${{ runner.os }}-sonar
216+
- name: Cache Maven packages
217+
uses: actions/cache@v1
218+
with:
219+
path: ~/.m2
220+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
221+
restore-keys: ${{ runner.os }}-m2
222+
- name: Build and analyze
223+
env:
224+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
225+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
226+
run: mvn --no-transfer-progress -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=arangodb_arangodb-java-reactive-driver
227+

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
<properties>
2525
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2626
<adb.jackson.version>2.13.3</adb.jackson.version>
27+
<sonar.organization>arangodb-1</sonar.organization>
28+
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
2729
</properties>
2830

2931
<developers>

0 commit comments

Comments
 (0)