Skip to content

Commit 7ade570

Browse files
authored
Grouping static checks under the same task (#1526)
* Grouping all static checks under the "check" task JAVA-5633
1 parent c39311e commit 7ade570

File tree

7 files changed

+7
-44
lines changed

7 files changed

+7
-44
lines changed

.evergreen/run-kotlin-tests.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ if [ "$SAFE_FOR_MULTI_MONGOS" == "true" ]; then
3131
export MULTI_MONGOS_URI_SYSTEM_PROPERTY="-Dorg.mongodb.test.multi.mongos.uri=${MONGODB_URI}"
3232
fi
3333

34-
echo "Running Kotlin tests"
35-
3634
./gradlew -version
37-
./gradlew kotlinCheck -Dorg.mongodb.test.uri=${MONGODB_URI} ${MULTI_MONGOS_URI_SYSTEM_PROPERTY}
35+
36+
echo "Running Kotlin Unit Tests"
37+
./gradlew :bson-kotlin:test :bson-kotlinx:test :driver-kotlin-sync:test :driver-kotlin-coroutine:test :driver-kotlin-extensions:test
38+
39+
echo "Running Kotlin Integration Tests"
40+
./gradlew :driver-kotlin-sync:integrationTest :driver-kotlin-coroutine:integrationTest -Dorg.mongodb.test.uri=${MONGODB_URI} ${MULTI_MONGOS_URI_SYSTEM_PROPERTY}

.evergreen/static-checks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE[0]:-$0}")"
1212
echo "Compiling JVM drivers"
1313

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

bson-kotlin/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,6 @@ spotbugs { showProgress.set(true) }
111111
// ===========================
112112
// Test Configuration
113113
// ===========================
114-
tasks.create("kotlinCheck") {
115-
description = "Runs all the kotlin checks"
116-
group = "verification"
117-
118-
dependsOn("clean", "check")
119-
tasks.findByName("check")?.mustRunAfter("clean")
120-
}
121114

122115
tasks.test { useJUnitPlatform() }
123116

bson-kotlinx/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,6 @@ spotbugs { showProgress.set(true) }
128128
// ===========================
129129
// Test Configuration
130130
// ===========================
131-
tasks.create("kotlinCheck") {
132-
description = "Runs all the kotlin checks"
133-
group = "verification"
134-
135-
dependsOn("clean", "check")
136-
tasks.findByName("check")?.mustRunAfter("clean")
137-
}
138131

139132
tasks.test { useJUnitPlatform() }
140133

driver-kotlin-coroutine/build.gradle.kts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,6 @@ val integrationTest =
156156
classpath = sourceSets["integrationTest"].runtimeClasspath
157157
}
158158

159-
tasks.create("kotlinCheck") {
160-
description = "Runs all the kotlin checks"
161-
group = "verification"
162-
163-
dependsOn("clean", "check", integrationTest)
164-
tasks.findByName("check")?.mustRunAfter("clean")
165-
tasks.findByName("integrationTest")?.mustRunAfter("check")
166-
}
167-
168159
tasks.test { useJUnitPlatform() }
169160

170161
// ===========================

driver-kotlin-extensions/build.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,6 @@ tasks.spotbugsMain {
127127
// Test Configuration
128128
// ===========================
129129

130-
tasks.create("kotlinCheck") {
131-
description = "Runs all the kotlin checks"
132-
group = "verification"
133-
134-
dependsOn("clean", "check")
135-
tasks.findByName("check")?.mustRunAfter("clean")
136-
}
137-
138130
tasks.test { useJUnitPlatform() }
139131

140132
// ===========================

driver-kotlin-sync/build.gradle.kts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,6 @@ val integrationTest =
150150
classpath = sourceSets["integrationTest"].runtimeClasspath
151151
}
152152

153-
tasks.create("kotlinCheck") {
154-
description = "Runs all the kotlin checks"
155-
group = "verification"
156-
157-
dependsOn("clean", "check", integrationTest)
158-
tasks.findByName("check")?.mustRunAfter("clean")
159-
tasks.findByName("integrationTest")?.mustRunAfter("check")
160-
}
161-
162153
tasks.test { useJUnitPlatform() }
163154

164155
// ===========================

0 commit comments

Comments
 (0)