Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
18 changes: 1 addition & 17 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

strategy:
matrix:
service: [main, gateway]
service: [main]

steps:
- name: Checkout code
Expand Down Expand Up @@ -48,8 +48,6 @@ jobs:
run: |
if [ "${{ matrix.service }}" = "main" ]; then
./gradlew :dms-main:test jacocoMainServiceReport --info
elif [ "${{ matrix.service }}" = "gateway" ]; then
./gradlew :dms-gateway:test jacocoGatewayServiceReport --info
fi

- name: Upload JaCoCo report artifact
Expand Down Expand Up @@ -90,16 +88,12 @@ jobs:
- name: Move reports to correct location
run: |
mkdir -p build/reports/jacoco/main-service
mkdir -p build/reports/jacoco/gateway-service
cp -r build/reports/jacoco/jacoco-report-main/* build/reports/jacoco/main-service/ 2>/dev/null || true
cp -r build/reports/jacoco/jacoco-report-gateway/* build/reports/jacoco/gateway-service/ 2>/dev/null || true

- name: Verify JaCoCo reports exist
run: |
echo "=== Main service report ==="
ls -la build/reports/jacoco/main-service/ || echo "No main service report found"
echo "=== Gateway service report ==="
ls -la build/reports/jacoco/gateway-service/ || echo "No gateway service report found"

- name: Delete previous JaCoCo comments
run: |
Expand All @@ -122,13 +116,3 @@ jobs:
min-coverage-overall: 24
min-coverage-changed-files: 50
title: '📊 Main Service Coverage Report'

- name: Comment PR with gateway service coverage
uses: madrapps/jacoco-report@v1.6.1
with:
paths: |
build/reports/jacoco/gateway-service/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 0
min-coverage-changed-files: 50
title: '📊 Gateway Service Coverage Report'
75 changes: 2 additions & 73 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ subprojects {
implementation(Dependencies.JACKSON)

// java servlet
if (!project.path.contains("dms-gateway")) {
implementation(Dependencies.JAVA_SERVLET)
}
implementation(Dependencies.JAVA_SERVLET)

// test
testImplementation(Dependencies.SPRING_TEST)
Expand Down Expand Up @@ -257,88 +255,19 @@ tasks.register<JacocoReport>("jacocoMainServiceReport") {
}
}

// dms-gateway 서비스 통합 리포트
tasks.register<JacocoReport>("jacocoGatewayServiceReport") {
group = "verification"
description = "Generate Jacoco coverage report for dms-gateway service"

val gatewayProjects = subprojects.filter {
it.path.startsWith(":dms-gateway") && it.pluginManager.hasPlugin("jacoco")
}

dependsOn(gatewayProjects.map { it.tasks.named("test") })
dependsOn(gatewayProjects.map { it.tasks.named<JacocoReport>("jacocoTestReport") })

executionData.setFrom(
gatewayProjects.map { project ->
fileTree(project.layout.buildDirectory.get().asFile).include("jacoco/*.exec")
}
)

val sourceSets = gatewayProjects.map {
it.the<org.gradle.api.tasks.SourceSetContainer>().getByName("main")
}

sourceDirectories.setFrom(sourceSets.map { it.allSource.srcDirs }.flatten())

classDirectories.setFrom(
files(sourceSets.map { sourceSet ->
sourceSet.output.classesDirs.files.map { dir ->
fileTree(dir) {
exclude(
"**/global/config/**",
"**/thirdparty/**/config/**",
"**/scheduler/config/**",
"**/persistence/**/entity/**",
"**/*Application.class",
"**/*Application\$*.class",
"**/*Properties.class",
"**/*Properties\$*.class",
"**/stub/**"
)
}
}
}.flatten())
)

reports {
xml.required.set(true)
html.required.set(true)
csv.required.set(false)

xml.outputLocation.set(layout.buildDirectory.file("reports/jacoco/gateway-service/jacocoTestReport.xml"))
html.outputLocation.set(layout.buildDirectory.dir("reports/jacoco/gateway-service/html"))
}

doLast {
val reportDir = layout.buildDirectory.dir("reports/jacoco/gateway-service/html").get().asFile
val indexFile = File(reportDir, "index.html")
if (indexFile.exists()) {
val content = indexFile.readText()
val updatedContent = content.replace(
"<h1>DMS-Backend</h1>",
"<h1>DMS-Gateway Service</h1>"
)
indexFile.writeText(updatedContent)
}
}
}

tasks.register("jacocoAllServiceReports") {
group = "verification"
description = "Generate Jacoco coverage reports for all services"

dependsOn(
"jacocoMainServiceReport",
"jacocoGatewayServiceReport"
"jacocoMainServiceReport"
)

doLast {
println()
println("========================================")
println("Jacoco Reports Generated:")
println(" - Main Service: build/reports/jacoco/main-service/html/index.html")
println(" - Gateway Service: build/reports/jacoco/gateway-service/html/index.html")
println("========================================")
}
}
Expand Down
17 changes: 3 additions & 14 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ comment:
layout: "header,diff,flags,components,files,footer"
behavior: default
require_changes: false
after_n_builds: 4 # overall + main + notification + gateway
after_n_builds: 3 # overall + main + notification
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

# 서비스별 플래그 설정
flag_management:
Expand All @@ -18,23 +18,17 @@ flags:
paths:
- dms-main/
- dms-notification/
- dms-gateway/
carryforward: false

main-service:
paths:
- dms-main/
carryforward: true

notification-service:
paths:
- dms-notification/
carryforward: true

gateway-service:
paths:
- dms-gateway/
carryforward: true

# 서비스별 컴포넌트 설정
component_management:
Expand All @@ -53,11 +47,6 @@ component_management:
name: Notification Service
paths:
- dms-notification/**

- component_id: gateway-service
name: Gateway Service
paths:
- dms-gateway/**

coverage:
precision: 2
Expand Down
85 changes: 0 additions & 85 deletions dms-gateway/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions dms-gateway/build.gradle.kts

This file was deleted.

9 changes: 0 additions & 9 deletions dms-gateway/gateway-core/build.gradle.kts

This file was deleted.

Loading
Loading