Skip to content

Commit

Permalink
Merge branch 'develop' into find-tx-by-account-memo-status
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeUrban authored Sep 5, 2023
2 parents 833bcd1 + 8463b4b commit 24010ca
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/sub_gradle_test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ jobs:
gradle_test_and_build:
name: Gradle Test and Build
runs-on: ubuntu-22.04
# write to PR permission is required for jacocoTestReport Action to update comment
permissions:
contents: read
pull-requests: write
steps:
# Checkout the code
- uses: actions/checkout@v3
Expand Down Expand Up @@ -51,7 +55,18 @@ jobs:
- name: Gradle test and build. (unit tests, integration tests, end-2-end tests and build)
env:
run_docker: false
run: ./gradlew clean build --no-daemon --stacktrace -x spotlessApply -x spotlessKotlinApply -x javadoc -x javadocJar -x sourcesJar
run: ./gradlew clean build jacocoTestReport --no-daemon --stacktrace -x spotlessApply -x spotlessKotlinApply -x javadoc -x javadocJar -x sourcesJar

- name: Add coverage to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60
title: Code Coverage
update-comment: true

- name: Stop docker containers
env:
Expand Down
11 changes: 11 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
java
alias(libs.plugins.spotless)
alias(libs.plugins.kotlin.jvm) apply false
jacoco
}

tasks {
Expand All @@ -25,6 +26,7 @@ tasks {
subprojects {
apply(plugin = "java")
apply(plugin = "com.diffplug.spotless")
apply(plugin = "jacoco")

repositories {
mavenLocal()
Expand Down Expand Up @@ -62,6 +64,15 @@ subprojects {
}

kotlin { ktfmt("0.42").googleStyle() }

tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
reports {
xml.required.set(true)
csv.required.set(false)
html.required.set(true)
}
}
}

dependencies {
Expand Down
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ toml4j = "0.7.2"
spotless = "6.9.1"
spring-boot = "2.7.9"
spring-dependency-management = "1.1.0"
jacoco = "0.8.10"

[libraries]
abdera = { module = "org.apache.abdera:abdera-i18n", version.ref = "abdera" }
Expand Down Expand Up @@ -158,4 +159,5 @@ spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }
spring-dependency-management = { id = "io.spring.dependency-management", version.ref = "spring-dependency-management" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ktor = { id = "io.ktor.plugin", version.ref = "ktor" }
ktor = { id = "io.ktor.plugin", version.ref = "ktor" }
jacoco = { id = "jacoco", version.ref = "jacoco" }

0 comments on commit 24010ca

Please sign in to comment.