Skip to content

Commit 6bb6be3

Browse files
codecov
1 parent 7803ec2 commit 6bb6be3

File tree

4 files changed

+41
-2
lines changed

4 files changed

+41
-2
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,30 @@ jobs:
5050
distribution: 'temurin'
5151
java-version: '21'
5252

53-
- name: Generate jOOQ Classes and Build
54-
run: ./gradlew clean generateJooq build --info --stacktrace
53+
- name: Build skeletonBatch
54+
run: |
55+
cd skeletonBatch
56+
../gradlew clean generateJooq build jacocoTestReport --info --stacktrace
57+
58+
- name: Build dbAndCsvBatch
59+
run: |
60+
cd dbAndCsvBatch
61+
../gradlew clean generateJooq build jacocoTestReport --info --stacktrace
62+
63+
- name: Upload coverage to Codecov for skeletonBatch
64+
uses: codecov/codecov-action@v4
65+
with:
66+
files: skeletonBatch/build/reports/jacoco/test/jacocoTestReport.xml
67+
68+
- name: Upload coverage to Codecov for dbAndCsvBatch
69+
uses: codecov/codecov-action@v4
70+
with:
71+
files: dbAndCsvBatch/build/reports/jacoco/test/jacocoTestReport.xml
72+
73+
- name: Upload coverage to Codecov
74+
uses: codecov/codecov-action@v4
75+
with:
76+
files: ./*/build/reports/jacoco/test/jacocoTestReport.xml
5577

5678
- name: Archive Test Reports
5779
if: always()

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
[![GitHub stars](https://img.shields.io/github/stars/KTC-YoheiMiyashita/SpringBoot3BatchStarter?style=social)](https://github.com/KTC-YoheiMiyashita/SpringBoot3BatchStarter/stargazers)
77
[![Build](https://github.com/kinto-technologies/SpringBoot3BatchStarter/actions/workflows/build.yml/badge.svg)](https://github.com/kinto-technologies/SpringBoot3BatchStarter/actions/workflows/build.yml)
8+
![Codecov](https://img.shields.io/codecov/c/github/kinto-technologies/SpringBoot3BatchStarter?style=flat)
89
![Java 21](https://img.shields.io/badge/Java-21%2B-blue)
910
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-CC2233.svg)](https://opensource.org/licenses/Apache-2.0)
1011

dbAndCsvBatch/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ tasks.withType(Test).configureEach {
6060
useJUnitPlatform()
6161
}
6262

63+
jacocoTestReport {
64+
reports {
65+
xml.required = true
66+
csv.required = true
67+
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
68+
}
69+
}
70+
6371
// https://github.com/diffplug/spotless
6472
spotless {
6573
java {

skeletonBatch/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ tasks.withType(Test).configureEach {
4343
useJUnitPlatform()
4444
}
4545

46+
jacocoTestReport {
47+
reports {
48+
xml.required = true
49+
csv.required = true
50+
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
51+
}
52+
}
53+
4654
// https://github.com/diffplug/spotless
4755
spotless {
4856
java {

0 commit comments

Comments
 (0)