Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 코드 정적 분석 SonarCloud 설정 #38

Merged
merged 30 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3b6d531
chore: sonarCloud 기본 설정
char-yb Nov 30, 2023
1fbb692
Merge branch 'develop' into chore/11-sonarcloud-setting
char-yb Dec 1, 2023
24db4e7
chore: sonarCloud 기본 설정
char-yb Dec 1, 2023
52fab63
chore: sonarCloud scan test
char-yb Dec 2, 2023
a3753bf
chore: sonarCloud config rollback
char-yb Dec 2, 2023
5411fae
chore: sonarCloud scan test
char-yb Dec 3, 2023
2009958
chore: sonarcloud-github-action
char-yb Dec 3, 2023
d10bd07
chore: SonarSource test
char-yb Dec 3, 2023
1f84469
chore: SonarSource test
char-yb Dec 3, 2023
7ad0bd3
chore: Sonar scan test
char-yb Dec 3, 2023
c6c788b
chore: Sonar scan test
char-yb Dec 3, 2023
3732a50
chore: Sonar scan test
char-yb Dec 3, 2023
66cde99
chore: Sonar scan test
char-yb Dec 3, 2023
e96321d
chore: Sonar scan test
char-yb Dec 3, 2023
6a5237d
chore: Sonar xml path
char-yb Dec 3, 2023
4121694
chore: Sonar test
char-yb Dec 4, 2023
25b7025
chore: Sonar test
char-yb Dec 4, 2023
35cb7ce
chore: Sonar test
char-yb Dec 4, 2023
8ecf49c
chore: Sonar test dependsOn
char-yb Dec 4, 2023
6251f5f
chore: Sonar Rollback
char-yb Dec 4, 2023
4e703fd
chore: Sonar build-action
char-yb Dec 5, 2023
5dd0b20
chore: Sonar build-action
char-yb Dec 5, 2023
f2efa11
chore: Sonar build-action
char-yb Dec 5, 2023
24777d1
chore: Sonar build-action
char-yb Dec 5, 2023
5a3db16
chore: Sonar Rollback
char-yb Dec 5, 2023
4350de9
chore: Sonar test
char-yb Dec 5, 2023
52e4a0a
chore: Sonar test
char-yb Dec 5, 2023
7880439
chore: Sonar Rollback
char-yb Dec 5, 2023
a0478c7
Merge branch 'develop' into chore/11-sonarcloud-setting
char-yb Dec 5, 2023
875adb3
chore: lifeCycle remove 1
char-yb Dec 5, 2023
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
17 changes: 13 additions & 4 deletions .github/workflows/develop_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
java-version: [ 17 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v3
Expand All @@ -22,12 +22,21 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: check
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}

- name: LifeCycle check
run: |
./gradlew check
- name: SonarCloud scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar --info --stacktrace
24 changes: 20 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id 'io.spring.dependency-management' version '1.1.3'
id 'com.diffplug.spotless' version '6.11.0'
id 'jacoco'
id 'org.sonarqube' version '4.4.1.3373'
}

group = 'com.depromeet'
Expand Down Expand Up @@ -44,10 +45,6 @@ tasks.named('test') {
finalizedBy 'jacocoTestReport'
}

jacoco {
toolVersion = "0.8.8"
}

def jacocoDir = layout.buildDirectory.dir("reports/")

def QDomains = []
Expand All @@ -68,6 +65,25 @@ def jacocoExcludePatterns = [
"**/*Resolver*"
]

sonar {
properties {
property "sonar.projectKey", "depromeet_10mm-server"
property "sonar.organization", "depromeet-1"
property "sonar.host.url", "https://sonarcloud.io"
property 'sonar.sources', 'src'
property 'sonar.language', 'java'
property 'sonar.sourceEncoding', 'UTF-8'
property 'sonar.test.exclusions', jacocoExcludePatterns.toString()
property 'sonar.test.inclusions', '**/*Test.java'
property 'sonar.java.coveragePlugin', 'jacoco'
property 'sonar.coverage.jacoco.xmlReportPaths', jacocoDir.get().file("jacoco/index.xml").asFile
}
}

jacoco {
toolVersion = "0.8.8"
}

jacocoTestReport {
dependsOn test
reports {
Expand Down