Skip to content

Commit c0db58d

Browse files
committed
ci: 🎡 Adds allure support
1 parent c8cd1e3 commit c0db58d

File tree

4 files changed

+51
-10
lines changed

4 files changed

+51
-10
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ hs_err_pid*
182182
### Maven ###
183183
target/
184184
pom.xml.tag
185+
pom.xml.bak
185186
pom.xml.releaseBackup
186187
pom.xml.versionsBackup
187188
pom.xml.next
@@ -373,3 +374,5 @@ csvpath/
373374
orcpath/
374375

375376
.env
377+
/kotlin-spark-api/.allure/
378+
/kotlin-spark-api/allure-results/

kotlin-spark-api/pom.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@
5151
</dependency>
5252
<dependency>
5353
<groupId>io.kotest</groupId>
54-
<artifactId>kotest-assertions-core-jvm</artifactId>
54+
<artifactId>kotest-runner-console-jvm</artifactId>
5555
<version>${kotest.version}</version>
5656
<scope>test</scope>
5757
</dependency>
5858
<dependency>
5959
<groupId>io.kotest</groupId>
60-
<artifactId>kotest-runner-console-jvm</artifactId>
60+
<artifactId>kotest-extensions-allure-jvm</artifactId>
6161
<version>${kotest.version}</version>
6262
<scope>test</scope>
6363
</dependency>
@@ -125,16 +125,28 @@
125125
<plugin>
126126
<groupId>org.jetbrains.dokka</groupId>
127127
<artifactId>dokka-maven-plugin</artifactId>
128-
<version>${dokka.version}</version>
128+
<version>1.4.0-rc</version>
129+
<configuration>
130+
<jdkVersion>8</jdkVersion>
131+
</configuration>
132+
<dependencies></dependencies>
129133
<executions>
130134
<execution>
131135
<goals>
132-
<goal>dokka</goal>
136+
<goal>javadocJar</goal>
133137
</goals>
134138
<phase>pre-site</phase>
135139
</execution>
136140
</executions>
137141
</plugin>
142+
<plugin>
143+
<groupId>io.qameta.allure</groupId>
144+
<artifactId>allure-maven</artifactId>
145+
<version>2.10.0</version>
146+
<configuration>
147+
<resultsDirectory>${project.basedir}/allure-results</resultsDirectory>
148+
</configuration>
149+
</plugin>
138150
</plugins>
139151
</build>
140152
<repositories>

kotlin-spark-api/src/test/kotlin/org/jetbrains/spark/api/ApiTest.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,16 @@ import ch.tutteli.atrium.api.fluent.en_GB.*
2121
import ch.tutteli.atrium.domain.builders.migration.asExpect
2222
import ch.tutteli.atrium.verbs.expect
2323
import io.kotest.core.spec.style.ShouldSpec
24-
import org.jetbrains.spark.api.*
2524
import java.time.LocalDate
2625

2726
class ApiTest : ShouldSpec({
2827
context("integration tests") {
2928
withSpark {
3029
should("collect data classes with doubles correctly") {
31-
3230
val ll1 = LonLat(1.0, 2.0)
3331
val ll2 = LonLat(3.0, 4.0)
3432
val lonlats = dsOf(ll1, ll2).collectAsList()
35-
expect(lonlats).asExpect().contains.inAnyOrder.only.values(ll1, ll2)
36-
33+
expect(lonlats).asExpect().contains.inAnyOrder.only.values(ll1.copy(), ll2.copy())
3734
}
3835
should("contain all generic primitives with complex schema") {
3936
val primitives = c(1, 1.0, 1.toFloat(), 1.toByte(), LocalDate.now(), true)
@@ -51,9 +48,11 @@ class ApiTest : ShouldSpec({
5148
val result = dsOf(1, 2, 3, 4, 5)
5249
.map { it to (it + 2) }
5350
.withCached {
54-
showDS()
51+
expect(collectAsList()).asExpect().contains.inAnyOrder.only.values(1 to 3, 2 to 4, 3 to 5, 4 to 6, 5 to 7)
5552

56-
filter { it.first % 2 == 0 }.showDS()
53+
val next = filter { it.first % 2 == 0 }
54+
expect(next.collectAsList()).asExpect().contains.inAnyOrder.only.values(2 to 4, 4 to 6)
55+
next
5756
}
5857
.map { c(it.first, it.second, (it.first + it.second) * 2) }
5958
.collectAsList()
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*-
2+
* =LICENSE=
3+
* Kotlin Spark API
4+
* ----------
5+
* Copyright (C) 2019 - 2020 JetBrains
6+
* ----------
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* =LICENSEEND=
19+
*/
20+
package org.jetbrains.spark.api
21+
22+
import io.kotest.core.config.AbstractProjectConfig
23+
import io.kotest.extensions.allure.AllureTestListener
24+
25+
object ProjectConfig : AbstractProjectConfig() {
26+
override fun listeners() = super.listeners() + AllureTestListener
27+
}

0 commit comments

Comments
 (0)