Skip to content

Commit 5440e5e

Browse files
authored
Merge pull request #39 from What-s-Your-Plan/actions
Jacoco Test Actions 수정
2 parents 45e2a5f + e27f29b commit 5440e5e

File tree

4 files changed

+61
-59
lines changed

4 files changed

+61
-59
lines changed

.github/workflows/application-core-server-test.yml

-27
This file was deleted.

.github/workflows/application-notification-server-test.yml

-27
This file was deleted.

.github/workflows/application-image-server-test.yml .github/workflows/backend-server-test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 🧪 Image Server Tests on Pull Request
1+
name: 🧪 Backend Tests on Pull Request
22

33
on:
44
pull_request:
@@ -27,14 +27,14 @@ jobs:
2727
run: chmod +x gradlew
2828

2929
- name: 🧪 Spring Boot Test
30-
run: ./gradlew clean application:wypl-image:test
30+
run: ./gradlew clean test
3131

3232
- name: Add coverage to PR
3333
id: jacoco
3434
uses: madrapps/[email protected]
3535
with:
36-
title: 📄 Image Server Jacoco Coverage Report
37-
paths: ${{ github.workspace }}/**/wypl-image/reports/jacoco/test/jacocoTestReport.xml
36+
title: 📄 Jacoco Coverage Report
37+
paths: ${{ github.workspace }}/**/reports/jacoco/test/jacocoTestReport.xml
3838
token: ${{ secrets.GITHUB_TOKEN }}
3939
min-coverage-overall: 80
4040
min-coverage-changed-files: 80

client/aws-s3-client/build.gradle

+57-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,60 @@ dependencies {
1212

1313
testImplementation('org.springframework.boot:spring-boot-starter-test')
1414
testImplementation('org.mockito:mockito-core')
15-
}
15+
}
16+
17+
/* Jacoco Start */
18+
tasks.withType(JacocoReport).configureEach {
19+
reports {
20+
html.required.set(true)
21+
xml.required.set(true)
22+
html.outputLocation.set(file("reports/jacoco/index.xml"))
23+
xml.outputLocation.set(file("reports/jacoco/test/jacocoTestReport.xml"))
24+
}
25+
26+
classDirectories.setFrom(
27+
files(classDirectories.files.collect {
28+
fileTree(it) {
29+
exclude(
30+
"**/*Application*",
31+
"**/*Configuration*",
32+
"**/*Request*",
33+
"**/*Response*",
34+
"**/common/**",
35+
"**/config/**",
36+
"**/data/**",
37+
"**/exception/**",
38+
"**/properties/**"
39+
)
40+
}
41+
})
42+
)
43+
}
44+
45+
tasks.jacocoTestCoverageVerification {
46+
violationRules {
47+
rule {
48+
enabled = true
49+
element = 'CLASS'
50+
51+
limit {
52+
counter = 'LINE'
53+
value = 'COVEREDRATIO'
54+
minimum = 0.80D
55+
}
56+
57+
excludes = [
58+
"**/*Application*",
59+
"**/*Configuration*",
60+
"**/*Request*",
61+
"**/*Response*",
62+
"**/common/**",
63+
"**/config/**",
64+
"**/data/**",
65+
"**/exception/**",
66+
"**/properties/**"
67+
]
68+
}
69+
}
70+
}
71+
/* Jacoco End */

0 commit comments

Comments
 (0)