Skip to content

Commit 9af046d

Browse files
authored
Utilise a code quality gating solution (#61)
Fixes #43 Signed-off-by: Zbynek Cervinka <[email protected]>
1 parent 01e4d4a commit 9af046d

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/sonar.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: SonarQube analysis - Linux
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build-linux:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up JDK 11
19+
uses: actions/setup-java@v1
20+
with:
21+
java-version: 11
22+
- name: Run Sonar analysis
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
26+
run: ./gradlew sonarqube

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
id 'maven-publish'
44
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
55
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
6+
id "org.sonarqube" version "3.3"
67
}
78

89
group 'com.redhat.devtools.intellij'
@@ -92,3 +93,12 @@ nexusPublishing {
9293
}
9394
}
9495
}
96+
97+
sonarqube {
98+
properties {
99+
property "sonar.projectKey", "redhat-developer_intellij-common-ui-test-library"
100+
property "sonar.organization", "redhat-developer"
101+
property "sonar.host.url", "https://sonarcloud.io"
102+
property "sonar.sources", "src"
103+
}
104+
}

0 commit comments

Comments
 (0)