Skip to content
Closed
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
56 changes: 56 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: SonarQube
on:
push:
branches:
- 'main'
pull_request:
permissions:
contents: read
jobs:
sonar:
name: SonarQube (${{ matrix.module }})
runs-on: ${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
module:
- spring-aop
- spring-aspects
- spring-beans
- spring-context
- spring-context-indexer
- spring-context-support
- spring-core
- spring-core-test
- spring-expression
- spring-instrument
- spring-jdbc
- spring-jms
- spring-messaging
- spring-orm
- spring-oxm
- spring-r2dbc
- spring-test
- spring-tx
- spring-web
- spring-webflux
- spring-webmvc
- spring-websocket
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.module }}
steps:
- name: Check Out Code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Prepare Gradle Build
uses: ./.github/actions/prepare-gradle-build
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
java-distribution: 'liberica'
java-early-access: 'false'
java-toolchain: 'false'
java-version: '25'
- name: Test and Scan
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew :${{ matrix.module }}:test :${{ matrix.module }}:sonar
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
id 'com.gradleup.shadow' version "9.2.2" apply false
id 'me.champeau.jmh' version '0.7.2' apply false
id 'io.spring.nullability' version '0.0.15' apply false
id 'org.sonarqube' version '7.4.0.8496' apply false
}

ext {
Expand Down Expand Up @@ -79,4 +80,5 @@ configure([rootProject] + javaProjects) { project ->

configure(moduleProjects) { project ->
apply from: "${rootDir}/gradle/spring-module.gradle"
apply from: "${rootDir}/gradle/sonar.gradle"
}
11 changes: 11 additions & 0 deletions gradle/sonar.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Configures standalone per-module SonarQube projects when applied from the root build.
apply plugin: 'org.sonarqube'

sonar {
properties {
property 'sonar.projectKey', "org.springframework:${project.name}"
property 'sonar.projectName', project.description ?: project.name
property 'sonar.projectVersion', project.version
property 'sonar.sourceEncoding', 'UTF-8'
}
}
Loading