Skip to content

Commit

Permalink
Add sonar scanner and build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hwbllmnn committed Aug 31, 2023
1 parent f085148 commit cf143b5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: build and analyse

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
java-version: [ 11, 17 ]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
cache: 'maven'
- run: mvn -B install --no-transfer-progress
- name: Analyse code and publish to SonarQube 📊
run: mvn -B -Dsonar.password=${{ secrets.SONAR_PASSWORD }} sonar:sonar
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@
</snapshotRepository>
</distributionManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.host.url>https://sq.terrestris.de</sonar.host.url>
<sonar.login>terrestris</sonar.login>
<sonar.sources>src/main/</sonar.sources>
</properties>

<profiles>
<profile>
<id>reporting</id>
Expand Down

0 comments on commit cf143b5

Please sign in to comment.