Skip to content

Commit

Permalink
Merge pull request robstoll#1834 from robstoll/chore/migrate-readme-e…
Browse files Browse the repository at this point in the history
…xamples-to-junit

migrate readme examples from spek to junit
  • Loading branch information
robstoll authored Sep 15, 2024
2 parents c068db8 + 3816928 commit 4112612
Show file tree
Hide file tree
Showing 30 changed files with 1,037 additions and 1,015 deletions.
225 changes: 120 additions & 105 deletions README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ apiValidation {
//misc not relevant for bc
"atrium-specs",
"atrium-verbs-internal",
"readme-examples"
"readme-examples",
)
)
val kotlinVersion = KotlinVersion.fromVersion(buildParameters.kotlin.version)
Expand Down
28 changes: 5 additions & 23 deletions misc/tools/readme-examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ kotlin {
main {
dependencies {
implementation(libs.junit.platform.console)
implementation(libs.spek.jvm)
implementation(libs.spek.runner)
implementation(libs.spek.runtime)
runtimeOnly(kotlin("reflect"))

implementation(prefixedProject("fluent"))
Expand All @@ -26,26 +23,11 @@ kotlin {
}
}
}
tasks {
register<JavaExec>("readme") {
group = "documentation"
description = "Runs examples, includes the code and the output in README.md"

classpath = project.sourceSets.main.get().runtimeClasspath
val version = rootProject.version.toString()
environment("README_SOURCETREE", if (version.endsWith("-SNAPSHOT")) "tree/main" else "tree/v$version")
}

this.mainClass.set("org.junit.platform.console.ConsoleLauncher")
args = listOf(
"--scan-class-path", project.sourceSets.main.get().output.classesDirs.asPath,
"--disable-banner",
"--fail-if-no-tests",
"--include-engine", "spek2-readme",
"--details", "summary"
)
}
check {
dependsOn("readme")
}
tasks.test.configure {
doFirst {
val version = rootProject.version.toString()
environment("README_SOURCETREE", if (version.endsWith("-SNAPSHOT")) "tree/main" else "tree/v$version")
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 4112612

Please sign in to comment.