From 6522cad727af6e4e1af74491b0a4c73e52278806 Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Sun, 12 Apr 2020 22:42:16 +0200 Subject: [PATCH] add coveralls job to the quality check stage - drop oraclejdk 8 - configure test logging - cleanup travis config - fix coveralls job with workaround see https://github.com/kt3k/coveralls-gradle-plugin/issues/85 --- .travis.yml | 27 +++++++++++++++------------ build.gradle | 7 +++++++ jbake-dist/build.gradle | 7 +++++++ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index f76784ea2..0bdbcca3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: java os: linux -dist: trusty +dist: bionic addons: hosts: @@ -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: diff --git a/build.gradle b/build.gradle index dcc410da6..3286ee586 100644 --- a/build.gradle +++ b/build.gradle @@ -90,6 +90,11 @@ subprojects { test { useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed" + exceptionFormat "full" + } } dependencies { @@ -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 { diff --git a/jbake-dist/build.gradle b/jbake-dist/build.gradle index 57576eb85..51349a738 100644 --- a/jbake-dist/build.gradle +++ b/jbake-dist/build.gradle @@ -44,4 +44,11 @@ task smokeTest(type: Test, dependsOn: installDist) { shouldRunAfter test } +smokeTest { + testLogging { + events "passed", "skipped", "failed" + exceptionFormat "full" + } +} + check.dependsOn smokeTest