Skip to content

Commit

Permalink
Switch to new test setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
deepy committed Aug 10, 2022
1 parent 6e36456 commit 15378ff
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 61 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -6,8 +6,8 @@ jobs:
strategy:
matrix:
config:
- {os: ubuntu-latest, params: "-PtestAllSupportedGradleVersions=true build" }
- {os: ubuntu-latest, params: "-PtestAllSupportedGradleVersions=true pnpmTests" }
- {os: ubuntu-latest, params: "'-PtestedGradleVersion=5.6.4|6.0|7.0|7.4' pnpmTests" }
- {os: ubuntu-latest, params: "'-PtestedGradleVersion=5.6.4|6.0|7.0|7.4' build" }
- {os: windows-latest, params: "build pnpmTests" }
- {os: macos-latest, params: "build pnpmTests" }
steps:
Expand Down
18 changes: 10 additions & 8 deletions build.gradle.kts
Expand Up @@ -65,14 +65,6 @@ tasks.compileTestGroovy {

tasks.withType(Test::class) {
useJUnitPlatform()
systemProperty("testAllSupportedGradleVersions", project.properties["testAllSupportedGradleVersions"] ?: "false")
systemProperty(
"testMinimumSupportedGradleVersion", project.properties["testMinimumSupportedGradleVersion"]
?: "false"
)
systemProperty("testMinimumCurrentGradleVersion", project.properties["testMinimumCurrentGradleVersion"] ?: "false")
systemProperty("testCurrentGradleVersion", project.properties["testCurrentGradleVersion"] ?: "true")
systemProperty("testSpecificGradleVersion", project.properties["testSpecificGradleVersion"] ?: "false")
systemProperty(
com.github.gradle.buildlogic.GradleVersionsCommandLineArgumentProvider.PROPERTY_NAME,
project.findProperty("testedGradleVersion") ?: gradle.gradleVersion
Expand All @@ -94,6 +86,10 @@ tasks.withType(Test::class) {

distribution {
enabled.set(project.properties["com.github.gradle.node.testdistribution"].toString().toBoolean())
remoteExecutionPreferred.set(project.properties["com.github.gradle.node.preferremote"].toString().toBoolean())
if (project.properties["com.github.gradle.node.remoteonly"].toString().toBoolean()) {
maxLocalExecutors.set(0)
}
}
}

Expand All @@ -118,6 +114,12 @@ tasks.register<Test>("testGradleReleases") {
)
}

tasks.register("printVersions") {
doLast {
println(com.github.gradle.buildlogic.GradleVersionData::getReleasedVersions.invoke())
}
}

tasks.register<Test>("testGradleNightlies") {
jvmArgumentProviders.add(
com.github.gradle.buildlogic.GradleVersionsCommandLineArgumentProvider(
Expand Down
15 changes: 0 additions & 15 deletions settings.gradle.kts
Expand Up @@ -4,11 +4,6 @@ plugins {
id("com.gradle.enterprise.test-distribution") version "2.3.5"
}

addScanProperty("testAllSupportedGradleVersions")
addScanProperty("testMinimumSupportedGradleVersion")
addScanProperty("testCurrentGradleVersion", "true")
addScanProperty("testSpecificGradleVersion")

val isCI = System.getenv().containsKey("CI")

gradleEnterprise {
Expand All @@ -30,13 +25,3 @@ gradleEnterprise {
}

rootProject.name = "gradle-node-plugin"


fun addScanProperty(name: String, default: String? = null) {
val property = extra.properties[name] as String?
if (property != null) {
if (default == null || default != property) {
gradleEnterprise.buildScan.value(name, property)
}
}
}
1 change: 1 addition & 0 deletions src/test/groovy/com/github/gradle/AbstractIntegTest.groovy
Expand Up @@ -132,6 +132,7 @@ abstract class AbstractIntegTest extends Specification {
if (explicitGradleVersions) {
return explicitGradleVersions.split("\\|")
.collect { GradleVersion.version(it)}
.unique()
} else {
[GradleVersion.current()]
}
Expand Down
36 changes: 0 additions & 36 deletions src/test/groovy/com/github/gradle/GradleVersionsForTest.groovy

This file was deleted.

0 comments on commit 15378ff

Please sign in to comment.