Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: SonarCloud

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

permissions:
contents: read

jobs:
sonar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Build, test, and analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew test jacocoTestReport sonar
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
id 'com.diffplug.spotless' version "${spotlessVersion}"
id 'net.ltgt.errorprone' version "${errorProneVersion}"
id 'jacoco'
id 'org.sonarqube' version "${sonarqubeVersion}"
}

group = 'com.accountabilityatlas'
Expand Down Expand Up @@ -95,6 +96,16 @@ jacocoTestCoverageVerification {

check.dependsOn jacocoTestCoverageVerification

// ---- SonarCloud ----
sonar {
properties {
property 'sonar.projectKey', 'kelleyglenn_AcctAtlas-api-gateway'
property 'sonar.projectName', 'AcctAtlas-api-gateway'
property 'sonar.organization', 'kelleyglenn'
property 'sonar.host.url', 'https://sonarcloud.io'
}
}

// ---- Jib ----
jib {
from {
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ testcontainersVersion=1.21.4

# Lombok
lombokVersion=1.18.42

# SonarQube
sonarqubeVersion=7.2.2.6593
Loading