Skip to content

Commit

Permalink
codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
KTC-YoheiMiyashita committed Dec 23, 2024
1 parent 7803ec2 commit 6bb6be3
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,30 @@ jobs:
distribution: 'temurin'
java-version: '21'

- name: Generate jOOQ Classes and Build
run: ./gradlew clean generateJooq build --info --stacktrace
- name: Build skeletonBatch
run: |
cd skeletonBatch
../gradlew clean generateJooq build jacocoTestReport --info --stacktrace
- name: Build dbAndCsvBatch
run: |
cd dbAndCsvBatch
../gradlew clean generateJooq build jacocoTestReport --info --stacktrace
- name: Upload coverage to Codecov for skeletonBatch
uses: codecov/codecov-action@v4
with:
files: skeletonBatch/build/reports/jacoco/test/jacocoTestReport.xml

- name: Upload coverage to Codecov for dbAndCsvBatch
uses: codecov/codecov-action@v4
with:
files: dbAndCsvBatch/build/reports/jacoco/test/jacocoTestReport.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./*/build/reports/jacoco/test/jacocoTestReport.xml

- name: Archive Test Reports
if: always()
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

Expand Down
8 changes: 8 additions & 0 deletions dbAndCsvBatch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ tasks.withType(Test).configureEach {
useJUnitPlatform()
}

jacocoTestReport {
reports {
xml.required = true
csv.required = true
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
}

// https://github.com/diffplug/spotless
spotless {
java {
Expand Down
8 changes: 8 additions & 0 deletions skeletonBatch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ tasks.withType(Test).configureEach {
useJUnitPlatform()
}

jacocoTestReport {
reports {
xml.required = true
csv.required = true
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
}

// https://github.com/diffplug/spotless
spotless {
java {
Expand Down

0 comments on commit 6bb6be3

Please sign in to comment.