Skip to content

Commit

Permalink
setup sonar-scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
vu-bui committed Jul 4, 2023
1 parent 47f5219 commit 22ab28a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ jobs:
gradle-version: 6.7
- name: Copy Dependencies
run: gradle katalonCopyDependencies
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Sonar scan
run: gradle sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.verbose=true
- name: Plugin Package
run: gradle katalonPluginPackage
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ build
Drivers/katalon_generated_*
Libs
settings
Reports
Reports

#Sonar
.scannerwork
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
id 'groovy'
id 'com.github.johnrengelman.shadow' version '4.0.4'
id "com.katalon.gradle-plugin" version "0.0.7"
id("org.sonarqube") version "4.0.0.2929"
}

repositories {
Expand Down Expand Up @@ -60,7 +59,8 @@ dependencies {
exclude group: 'org.olap4j'
exclude group: 'xml-apis'
}
compile 'dom4j:dom4j:1.6.1'
compile 'net.sf.jasperreports:jasperreports-fonts:6.0.0'
compile 'commons-collections:commons-collections:3.2.2'
}
// TODO how to externalize these jar files for a complete indenpendent build?
compileOnly(fileTree('/Applications/Katalon Studio.app/Contents/Eclipse/plugins') { include('*.jar') })
compileOnly(fileTree('/Applications/Katalon Studio.app/Contents/Eclipse/configuration/resources/lib') { include('*.jar') })
}
4 changes: 4 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sonar.host.url=https://sonarcloud.io
sonar.projectKey=katalon-studio_katalon-studio-basic-report-plugin
sonar.sources=Keywords,Test Listeners,Include/scripts/groovy
sonar.java.binaries=build

0 comments on commit 22ab28a

Please sign in to comment.