Skip to content

Commit

Permalink
add coveralls job to the quality check stage
Browse files Browse the repository at this point in the history
- drop oraclejdk 8
- configure test logging
- cleanup travis config
- fix coveralls job with workaround
  see kt3k/coveralls-gradle-plugin#85
  • Loading branch information
ancho committed Apr 12, 2020
1 parent 800bbb8 commit 6522cad
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: java

os: linux
dist: trusty
dist: bionic

addons:
hosts:
Expand All @@ -14,32 +14,35 @@ before_install:
install: true

script:
- "./gradlew check"

after_failure:
- "./gradlew clean check -debug --stacktrace"

after_success:
- "./gradlew -PskipSigning jacocoRootReport coveralls || ./gradlew clean"
- "./gradlew check --stacktrace"

jdk:
- openjdk14
- openjdk11
- oraclejdk8
- openjdk8

jobs:
include:

- script: "./gradlew check"
jdk:
- jdk: openjdk14
os: osx

- jdk: openjdk11
os: osx

- stage: Quality Check
jdk: oraclejdk8
name: sonarqube
jdk: openjdk11
script:
- "./gradlew jacocoRootReport sonarqube -i --stacktrace"

- stage: Quality Check
name: coveralls
jdk: openjdk11
script:
- "./gradlew -PskipSigning jacocoRootReport coveralls -i --stacktrace"
- curl -F 'json_file=@build/coveralls/report.json' 'https://coveralls.io/api/v1/jobs'

notifications:
irc: "irc.freenode.org#jbake"
webhooks:
Expand Down
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ subprojects {

test {
useJUnitPlatform()

testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}

dependencies {
Expand Down Expand Up @@ -180,6 +185,8 @@ task testReport(type: TestReport) {
coveralls {
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
saveAsFile = true
sendToCoveralls = false
}

tasks.coveralls {
Expand Down
7 changes: 7 additions & 0 deletions jbake-dist/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,11 @@ task smokeTest(type: Test, dependsOn: installDist) {
shouldRunAfter test
}

smokeTest {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}

check.dependsOn smokeTest

0 comments on commit 6522cad

Please sign in to comment.