Skip to content

Commit

Permalink
Remove test modules (#2874)
Browse files Browse the repository at this point in the history
  • Loading branch information
serras committed Dec 28, 2022
1 parent 99e50bd commit 7a08939
Show file tree
Hide file tree
Showing 160 changed files with 1,503 additions and 2,965 deletions.
62 changes: 58 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
name: 'reports-windows'
path: '**/build/reports/**'

ubuntu:
jvm:
runs-on: ubuntu-latest
timeout-minutes: 60

Expand All @@ -115,10 +115,10 @@ jobs:
with:
arguments: compileTestKotlin

- name: check
- name: jvmTest
uses: gradle/gradle-build-action@v2
with:
arguments: check
arguments: jvmTest

- name: Create code coverage report
if: "! github.event.pull_request.head.repo.fork "
Expand All @@ -140,7 +140,61 @@ jobs:
if: failure()
uses: actions/upload-artifact@v3
with:
name: 'reports-ubuntu'
name: 'reports-jvm'
path: '**/build/reports/**'

js:
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- name: jsTest
uses: gradle/gradle-build-action@v2
with:
arguments: jsTest --info

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: 'reports-js'
path: '**/build/reports/**'

linux:
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- name: linuxX64Test
uses: gradle/gradle-build-action@v2
with:
arguments: linuxX64Test

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: 'reports-linux'
path: '**/build/reports/**'

update_api:
Expand Down
5 changes: 4 additions & 1 deletion arrow-libs/core/arrow-continuations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ kotlin {
if(!enableCompatibilityMetadataVariant) {
commonTest {
dependencies {
implementation(project(":arrow-core-test"))
implementation(projects.arrowCore)
implementation(libs.kotest.frameworkEngine)
implementation(libs.kotest.assertionsCore)
implementation(libs.kotest.property)
}
}
jvmTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import arrow.core.computations.ensureNotNull
import arrow.core.computations.eval
import arrow.core.left
import arrow.core.right
import arrow.core.test.UnitSpec
import io.kotest.assertions.fail
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe
import io.kotest.property.Arb
import io.kotest.property.arbitrary.boolean
import io.kotest.property.arbitrary.int
import io.kotest.property.arbitrary.orNull
import io.kotest.property.arbitrary.string
import io.kotest.property.checkAll
import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Deferred
Expand All @@ -31,7 +32,7 @@ import kotlin.coroutines.intrinsics.intercepted
import kotlin.coroutines.intrinsics.suspendCoroutineUninterceptedOrReturn
import kotlin.coroutines.startCoroutine

class SuspendingComputationTest : UnitSpec({
class SuspendingComputationTest : StringSpec({

"immediate values" {
either<String, Int> {
Expand Down
5 changes: 4 additions & 1 deletion arrow-libs/core/arrow-core-retrofit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ dependencies {
compileOnly(libs.squareup.retrofit)

if (!enableCompatibilityMetadataVariant) {
testImplementation(projects.arrowCore)
testImplementation(libs.kotest.frameworkEngine)
testImplementation(libs.kotest.assertionsCore)
testImplementation(libs.kotest.property)
testCompileOnly(libs.kotlin.reflect)
testRuntimeOnly(libs.kotest.runnerJUnit5)
testImplementation(project(":arrow-core-test"))
testImplementation(libs.squareup.okhttpMockWebServer)
testImplementation(libs.squareup.retrofitConverterGson)
testImplementation(libs.squareup.retrofitConverterMoshi)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@ package arrow.retrofit.adapter.either

import arrow.core.left
import arrow.core.right
import arrow.core.test.UnitSpec
import arrow.retrofit.adapter.mock.ErrorMock
import arrow.retrofit.adapter.mock.ResponseMock
import arrow.retrofit.adapter.retrofit.SuspendApiTestClient
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okhttp3.mockwebserver.SocketPolicy
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class ArrowEitherCallAdapterTest : UnitSpec() {
class ArrowEitherCallAdapterTest : StringSpec({

private lateinit var server: MockWebServer
private lateinit var service: SuspendApiTestClient

init {
lateinit var server: MockWebServer
lateinit var service: SuspendApiTestClient

beforeAny {
server = MockWebServer()
Expand Down Expand Up @@ -88,5 +86,5 @@ class ArrowEitherCallAdapterTest : UnitSpec() {

body.isFailure shouldBe true
}
}
}

})
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@ package arrow.retrofit.adapter.either

import arrow.core.left
import arrow.core.right
import arrow.core.test.UnitSpec
import arrow.retrofit.adapter.mock.ErrorMock
import arrow.retrofit.adapter.mock.ResponseMock
import arrow.retrofit.adapter.retrofit.SuspendApiTestClient
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okhttp3.mockwebserver.SocketPolicy
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class ArrowResponseEAdapterTest : UnitSpec() {
class ArrowResponseEAdapterTest : StringSpec({

private lateinit var server: MockWebServer
private lateinit var service: SuspendApiTestClient

init {
lateinit var server: MockWebServer
lateinit var service: SuspendApiTestClient

beforeAny {
server = MockWebServer()
Expand Down Expand Up @@ -100,5 +98,5 @@ class ArrowResponseEAdapterTest : UnitSpec() {

responseE.isFailure shouldBe true
}
}
}

})

0 comments on commit 7a08939

Please sign in to comment.