From 9b595490bd4e1835d0a71777b73c0497cb9de1bb Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 17 Sep 2022 12:00:53 -0700 Subject: [PATCH] Exclude 'no-ci' test group with CI. Removed testAll. --- build.gradle | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 9bea661..94bdd5f 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,8 @@ final def packageName = 'net.thauvin.erik.mobibot' final def deployDir = 'deploy' final def semverProcessor = "net.thauvin.erik:semver:1.2.0" +final def isCI = (System.getenv('CI') != null) + def isNonStable = { String version -> def stableKeyword = ['RELEASE', 'FINAL', 'GA', 'JRE'].any { it -> version.toUpperCase().contains(it) } def regex = /^[0-9,.v-]+(-r)?$/ @@ -88,22 +90,20 @@ dependencies { test { useTestNG() { - excludeGroups('no-ci') + if (isCI) { + excludeGroups('no-ci') + println "Excluded test groups: ${excludeGroups}" + } } } tasks.withType(Test).configureEach { testLogging { exceptionFormat = 'full' - events('skipped', 'failed') + events('passed', 'skipped', 'failed') } } - -task testAll(type: Test, group: 'verification', description: 'Run all tests.') { - useTestNG() -} - java { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 @@ -169,20 +169,14 @@ run { incrementBuildMeta { doFirst { - if (!System.getenv('CI')) { - buildMeta = sprintf("%03d", (buildMeta as Integer) + 1) - } else { + if (isCI) { println 'No increment with CI.' + } else { + buildMeta = sprintf("%03d", (buildMeta as Integer) + 1) } } } -kover { - instrumentation { - excludeTasks.add('testAll') - } -} - sonarqube { properties { property('sonar.organization', 'ethauvin-github')