Skip to content

Commit

Permalink
make coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Sep 3, 2024
1 parent 9831d5a commit 316c83b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ test-nextflow: clean nextflow-git compile check #coverage

test-all: clean compile-all check #coverage

coverage:
./gradlew jacocoTestReport
open plugins/nf-quilt/build/reports/jacoco/test/html/index.html

#
# Create packages
#
Expand Down
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ plugins {
id 'idea'
id 'se.patrikerdes.use-latest-versions' version '0.2.18'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'jacoco'
}

// Add ability to test with upcoming versions of Groovy
Expand Down Expand Up @@ -62,6 +63,7 @@ allprojects {
apply plugin: 'idea'
apply plugin: 'groovy'
apply plugin: 'java-library'
apply plugin: 'jacoco'

java {
toolchain {
Expand Down Expand Up @@ -116,6 +118,19 @@ allprojects {
useJUnitPlatform()
}

jacoco {
toolVersion = '0.8.12'
reportsDirectory = layout.buildDirectory.dir('reports/jacoco')
}

jacocoTestReport {
reports {
xml.required = true
csv.required = true
html.required = true
}
}

// this is required due to this IDEA bug
// https://youtrack.jetbrains.com/issue/IDEA-129282
sourceSets {
Expand Down
9 changes: 9 additions & 0 deletions plugins/nf-quilt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ plugins {
id 'idea'
id 'se.patrikerdes.use-latest-versions' version '0.2.18'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'jacoco'
}

useLatestVersions {
Expand Down Expand Up @@ -115,3 +116,11 @@ test {
useJUnitPlatform()
}

jacocoTestReport {
reports {
xml.required = true
csv.required = true
html.required = true
}
}

0 comments on commit 316c83b

Please sign in to comment.