Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Test #9

Open
wants to merge 5 commits into
base: gradle
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion .github/workflows/build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# a pull request.
push:
branches:
- master
- gradle
pull_request:
types:
- opened
Expand Down Expand Up @@ -43,3 +43,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: SonarQube Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
# Force to fail step after specific time
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jacocoTestReport {

sonarqube {
properties {
property 'sonar.host.url', 'https://sonarcloud.io'
property 'sonar.organization', 'sonarsource'
property 'sonar.projectKey', 'SonarSource_sonarcloud-github-action-samples'
property "sonar.projectKey", "PaulJason94_sonarcloud-github-action-samples"
property "sonar.organization", "pauljason94-1"
property "sonar.host.url", "https://sonarcloud.io"
}
}
4 changes: 3 additions & 1 deletion src/main/java/HelloWorld.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
public class HelloWorld {
public String say() {
return "hello world";
String str = "hello world";
return "hello world";
}

}