Skip to content

Commit 0d78905

Browse files
committed
Use specific check tasks for CI build
1 parent cbdbb27 commit 0d78905

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

ci/build.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,18 @@ elif [ "$RDBMS" == "informix" ]; then
7676
goal="-Pdb=informix"
7777
fi
7878

79-
# Disable checkstyle
80-
#if [ -n "$goal" ]; then
81-
goal="$goal -x checkstyleMain -DPOPULATE_REMOTE=true"
82-
#fi
79+
# Only run checkstyle and spotlessCheck in the H2 build,
80+
# so that CI jobs give a more complete report
81+
# and developers can fix code style and non-H2 DB tests in parallel.
82+
if [ -n "$goal" ]; then
83+
goal="$goal ciCheck -DPOPULATE_REMOTE=true"
84+
else
85+
goal="$goal ciCheckComplete"
86+
fi
8387

8488
function logAndExec() {
8589
echo 1>&2 "Executing:" "${@}"
8690
exec "${@}"
8791
}
8892

89-
logAndExec ./gradlew check ${goal} "${@}" -Plog-test-progress=true --stacktrace
93+
logAndExec ./gradlew -x spotlessApply ${goal} "${@}" -Plog-test-progress=true --stacktrace

gradle/java-module.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,29 @@ spotless {
483483
}
484484
}
485485

486+
tasks.check.dependsOn spotlessApply
487+
488+
tasks.register( "ciCheck" ) {
489+
group "verification"
490+
description "Checks for most CI environments"
491+
dependsOn test
492+
spotlessApply {
493+
enabled = false
494+
}
495+
spotlessJavaApply {
496+
enabled = false
497+
}
498+
}
499+
500+
tasks.register( "ciCheckComplete" ) {
501+
group "verification"
502+
description "More complete checking for the H2 CI environment. The extra work is only needed for one job in the group"
503+
504+
dependsOn ciCheck
505+
dependsOn spotlessCheck
506+
// dependsOn enforceRules
507+
dependsOn forbiddenApisMain
508+
}
486509

487510
class CompilerStubsArgumentProvider implements CommandLineArgumentProvider {
488511

0 commit comments

Comments
 (0)