Skip to content

Commit b8d95cc

Browse files
committed
CI fixes
1 parent 50d9a51 commit b8d95cc

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/maven.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- master
7+
- v7
8+
- v6
79
pull_request:
810
types: [ opened, synchronize, reopened ]
911
branches:
@@ -129,3 +131,55 @@ jobs:
129131
run: mvn -version
130132
- name: Test
131133
run: mvn --no-transfer-progress test -DargLine="-Duser.language=${{matrix.user-language}}"
134+
135+
sonar:
136+
timeout-minutes: 10
137+
runs-on: ubuntu-latest
138+
139+
strategy:
140+
fail-fast: false
141+
matrix:
142+
docker-img:
143+
- docker.io/arangodb/enterprise:3.9.1
144+
topology:
145+
- cluster
146+
db-ext-names:
147+
- false
148+
java-version:
149+
- 11
150+
151+
steps:
152+
- uses: actions/checkout@v2
153+
- name: Set up JDK
154+
uses: actions/setup-java@v2
155+
with:
156+
java-version: ${{matrix.java-version}}
157+
distribution: 'adopt'
158+
cache: maven
159+
- name: Start Database
160+
run: ./docker/start_db.sh
161+
env:
162+
ARANGO_LICENSE_KEY: ${{ secrets.ARANGO_LICENSE_KEY }}
163+
STARTER_MODE: ${{matrix.topology}}
164+
DOCKER_IMAGE: ${{matrix.docker-img}}
165+
DATABASE_EXTENDED_NAMES: ${{matrix.db-ext-names}}
166+
- name: Info
167+
run: mvn -version
168+
- name: Cache SonarCloud packages
169+
uses: actions/cache@v1
170+
with:
171+
path: ~/.sonar/cache
172+
key: ${{ runner.os }}-sonar
173+
restore-keys: ${{ runner.os }}-sonar
174+
- name: Cache Maven packages
175+
uses: actions/cache@v1
176+
with:
177+
path: ~/.m2
178+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
179+
restore-keys: ${{ runner.os }}-m2
180+
- name: Build and analyze
181+
env:
182+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
183+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
184+
run: mvn -B --no-transfer-progress -Dgpg.skip=true verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=arangodb_arangodb-java-driver
185+

0 commit comments

Comments
 (0)