Skip to content

Commit 3a123a5

Browse files
committed
HHH-18678 Use specific check tasks for CI build
1 parent ee2d8a3 commit 3a123a5

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

ci/build.sh

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

79+
# Only run enforceRules 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
87+
7988
function logAndExec() {
8089
echo 1>&2 "Executing:" "${@}"
8190
exec "${@}"
8291
}
8392

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

gradle/java-module.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,27 @@ spotless {
514514

515515
tasks.spotlessApply.dependsOn enforceRules
516516

517+
tasks.register( "ciCheck" ) {
518+
group "verification"
519+
description "Checks for most CI environments"
520+
dependsOn test
521+
spotlessApply {
522+
enabled = false
523+
}
524+
spotlessJavaApply {
525+
enabled = false
526+
}
527+
}
528+
529+
tasks.register( "ciCheckComplete" ) {
530+
group "verification"
531+
description "More complete checking for the H2 CI environment. The extra work is only needed for one job in the group"
532+
533+
dependsOn ciCheck
534+
dependsOn spotlessCheck
535+
dependsOn enforceRules
536+
dependsOn forbiddenApisMain
537+
}
517538

518539
class CompilerStubsArgumentProvider implements CommandLineArgumentProvider {
519540

0 commit comments

Comments
 (0)