Skip to content

Commit 306b5a5

Browse files
committed
The lib mockito-scala-scalatest replaced with scalatestplus mockito. Scala 3 (re)added to CI
1 parent 61145aa commit 306b5a5

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: true
3434
matrix:
35-
# cannot test or even compile tests on Scala 3.2.2 (mockito-scala-scalatest is not available)
36-
scala: [ '2.12.18', '2.13.11']
35+
scala: [ '2.12.18', '2.13.11', '3.2.2']
3736

3837
steps:
3938
- uses: actions/checkout@v3
@@ -71,8 +70,7 @@ jobs:
7170
matrix:
7271
distribution: [ 'corretto' ]
7372
jdk: [ '11' ]
74-
# cannot test or even compile tests on Scala 3.2.2 (mockito-scala-scalatest is not available)
75-
scala: [ '2.12.18', '2.13.11']
73+
scala: [ '2.12.18', '2.13.11', '3.2.2']
7674
experimental: [ false ]
7775
include:
7876
- jdk: '17'

build.sbt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ThisBuild / isSnapshot := false
1313
lazy val commonSettings = Seq(
1414
libraryDependencies += "org.scalactic" %% "scalactic" % "3.2.16",
1515
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.16" % Test,
16+
libraryDependencies += "org.scalatestplus" %% "mockito-4-11" % "3.2.16.0" % Test,
1617
libraryDependencies ++= extraTestDependencies(scalaVersion.value),
1718
crossScalaVersions := List(scala212, scala213, scala3)
1819
)
@@ -21,13 +22,16 @@ def extraTestDependencies(scalaVersion: String) =
2122
CrossVersion.partialVersion(scalaVersion) match {
2223
case Some((2, 12)) =>
2324
Seq(
24-
"org.mockito" %% "mockito-scala-scalatest" % "1.17.14" % Test,
2525
"com.typesafe.akka" %% "akka-actor-testkit-typed" % "2.6.1" % Test
2626
)
2727

2828
case Some((2, 13)) =>
2929
Seq(
30-
"org.mockito" %% "mockito-scala-scalatest" % "1.17.14" % Test,
30+
"com.typesafe.akka" %% "akka-actor-testkit-typed" % "2.6.20" % Test
31+
)
32+
33+
case Some((3, _)) =>
34+
Seq(
3135
"com.typesafe.akka" %% "akka-actor-testkit-typed" % "2.6.20" % Test
3236
)
3337

openai-client/src/test/scala/io/cequence/openaiscala/RetryHelpersSpec.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ package io.cequence.openaiscala
33
import akka.actor.{ActorSystem, Scheduler}
44
import akka.testkit.TestKit
55
import io.cequence.openaiscala.RetryHelpers.{RetrySettings, delay, retry}
6-
import org.mockito.scalatest.MockitoSugar
6+
import org.mockito.Mockito._
7+
import org.scalatestplus.mockito.MockitoSugar
78
import org.scalatest.RecoverMethods._
89
import org.scalatest.concurrent.ScalaFutures
910
import org.scalatest.matchers.should.Matchers

0 commit comments

Comments
 (0)