Skip to content

Commit

Permalink
refactor: jacoco, sonarqube 관련 설정 제거 (#760)
Browse files Browse the repository at this point in the history
* refactor: build 시 jacoco, sonarqube 관련 설정 제거

* refactor: 동작하지 않는 test disabled 처리
  • Loading branch information
dusdn1702 authored Jan 21, 2022
1 parent 869d098 commit a00763b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 59 deletions.
59 changes: 0 additions & 59 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ plugins {
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id "org.asciidoctor.convert" version "1.5.10"
id 'java'
id 'jacoco'
id "org.sonarqube" version "3.3"
}

group = 'com.woowacourse'
Expand Down Expand Up @@ -78,10 +76,6 @@ dependencies {
test {
outputs.dir snippetsDir
useJUnitPlatform()
jacoco {
destinationFile = file("$buildDir/jacoco/jacoco.exec")
}
finalizedBy jacocoTestReport
}

asciidoctor {
Expand All @@ -101,56 +95,3 @@ bootJar {
into 'static/docs'
}
}

jacocoTestReport {
reports {
html.enabled true
xml.enabled true
csv.enabled false
}
finalizedBy jacocoTestCoverageVerification
}

jacocoTestCoverageVerification {
violationRules {
rule {
element = 'CLASS'
excludes = ["**.exception.**", "**.ControllerAdvice", "**.*ErrorResponse", "**.ValidatorMessage",
"**.ZzimkkongApplication", "**.DataLoader", "**.config.**",
"**.LoginInterceptor", "**.AuthenticationPrincipalArgumentResolver",
"**.slack.**", "**.Slack*", "**.AdminPageController", "**.Warmer*"]

limit {
counter = 'BRANCH'
value = 'COVEREDRATIO'
minimum = 1.0
}

limit {
counter = 'INSTRUCTION'
value = 'COVEREDRATIO'
minimum = 0.9
}
}
}
}

project.tasks["jacocoTestCoverageVerification"].finalizedBy "sonarqube"
sonarqube {
def sonarProperties = new Properties()
sonarProperties.load(new FileInputStream(file("src/main/resources/config/sonar.properties")))
def sonarToken = sonarProperties.getProperty("SONAR_TOKEN")

properties {
property "sonar.host.url", "http://zzimkkong-service.o-r.kr:8000"
property "sonar.login", sonarToken
property 'sonar.sources', 'src'
property 'sonar.language', 'java'
property 'sonar.projectVersion', '0.0.1-SNAPSHOT'
property 'sonar.sourceEncoding', 'UTF-8'
property 'sonar.coverage.jacoco.xmlReportPaths', 'build/reports/jacoco/test/jacocoTestReport.xml'
property 'sonar.java.binaries', 'build/classes'
property 'sonar.test.inclusions', '**/*Test.java'
property 'sonar.exclusions', '**/*Doc*.java, **/resources/**, **/config/datasource/**, **/DataLoader.java, **/Warmer.java'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -27,6 +28,7 @@

@SpringBootTest
@ActiveProfiles("test")
@Disabled
class S3ProxyUploaderTest {
private static final String URL_REGEX = "^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
private static final Pattern URL_PATTERN = Pattern.compile(URL_REGEX);
Expand Down

0 comments on commit a00763b

Please sign in to comment.