Skip to content

Commit 05448a3

Browse files
committed
Evergreen: Updated static checks
Ensures that Kotlin and Scala checks are also run JAVA-5095
1 parent 86b29fd commit 05448a3

File tree

10 files changed

+32
-9
lines changed

10 files changed

+32
-9
lines changed

.evergreen/.evg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ tasks:
901901
commands:
902902
- func: "exec script"
903903
vars:
904-
file: ".evergreen/compile.sh"
904+
file: ".evergreen/static-checks.sh"
905905

906906
- name: "test"
907907
commands:

.evergreen/run-kotlin-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ fi
3434
echo "Running Kotlin tests"
3535

3636
./gradlew -version
37-
./gradlew kCheck -Dorg.mongodb.test.uri=${MONGODB_URI} ${MULTI_MONGOS_URI_SYSTEM_PROPERTY}
37+
./gradlew kotlinCheck -Dorg.mongodb.test.uri=${MONGODB_URI} ${MULTI_MONGOS_URI_SYSTEM_PROPERTY}

.evergreen/run-scala-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ fi
3434
echo "Running scala tests with Scala $SCALA"
3535

3636
./gradlew -version
37-
./gradlew -PscalaVersion=$SCALA --stacktrace --info :bson-scala:test :driver-scala:test :driver-scala:integrationTest -Dorg.mongodb.test.uri=${MONGODB_URI} ${MULTI_MONGOS_URI_SYSTEM_PROPERTY}
37+
./gradlew -PscalaVersion=$SCALA --stacktrace --info scalaCheck -Dorg.mongodb.test.uri=${MONGODB_URI} ${MULTI_MONGOS_URI_SYSTEM_PROPERTY}

.evergreen/compile.sh renamed to .evergreen/static-checks.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set -o errexit # Exit the script with error if any of the commands fail
99
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE[0]:-$0}")"
1010
. "${RELATIVE_DIR_PATH}/javaConfig.bash"
1111

12-
echo "Compiling java driver"
12+
echo "Compiling JVM drivers"
1313

1414
./gradlew -version
15-
./gradlew -PxmlReports.enabled=true --info -x test -x integrationTest -x spotlessApply clean check jar testClasses docs
15+
./gradlew -PxmlReports.enabled=true --info -x test -x integrationTest -x spotlessApply clean check scalaCheck kotlinCheck jar testClasses docs

bson-kotlin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ spotbugs { showProgress.set(true) }
111111
// ===========================
112112
// Test Configuration
113113
// ===========================
114-
tasks.create("kCheck") {
114+
tasks.create("kotlinCheck") {
115115
description = "Runs all the kotlin checks"
116116
group = "verification"
117117

bson-kotlinx/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ spotbugs { showProgress.set(true) }
115115
// ===========================
116116
// Test Configuration
117117
// ===========================
118-
tasks.create("kCheck") {
118+
tasks.create("kotlinCheck") {
119119
description = "Runs all the kotlin checks"
120120
group = "verification"
121121

bson-scala/build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ tasks.withType(Test) {
3939
}
4040
}
4141

42+
// ===================
43+
// Scala checks
44+
// ===================
45+
tasks.register("scalaCheck") {
46+
description = "Runs all the Scala checks"
47+
group = "verification"
48+
49+
dependsOn("clean", "compileTestScala", "check")
50+
tasks.findByName("check").mustRunAfter("clean")
51+
}
52+
4253
ext {
4354
pomName = 'Mongo Scala Bson Library'
4455
}

driver-kotlin-coroutine/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ val integrationTest =
155155
classpath = sourceSets["integrationTest"].runtimeClasspath
156156
}
157157

158-
tasks.create("kCheck") {
158+
tasks.create("kotlinCheck") {
159159
description = "Runs all the kotlin checks"
160160
group = "verification"
161161

driver-kotlin-sync/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ val integrationTest =
150150
classpath = sourceSets["integrationTest"].runtimeClasspath
151151
}
152152

153-
tasks.create("kCheck") {
153+
tasks.create("kotlinCheck") {
154154
description = "Runs all the kotlin checks"
155155
group = "verification"
156156

driver-scala/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ task integrationTest(type: Test) {
6969

7070
check.dependsOn integrationTest
7171

72+
// ===================
73+
// Scala checks
74+
// ===================
75+
tasks.register("scalaCheck") {
76+
description = "Runs all the Scala checks"
77+
group = "verification"
78+
79+
dependsOn("clean", "compileTestScala", "compileIntegrationTestScala", "check")
80+
tasks.findByName("check").mustRunAfter("clean")
81+
}
82+
83+
7284
task aggregatedScalaDoc(type: ScalaDoc) {
7385
description('Unified Scaladoc for bson-scala and driver-scala')
7486
group('documentation')

0 commit comments

Comments
 (0)