Rohan Sircar
3 years ago
9 changed files with 127 additions and 107 deletions
-
31.github/workflows/ci.yaml
-
1.scalafix.conf
-
87build.sbt
-
2modules/test-common/src/main/scala/wow/doge/MonixBioSuite.scala
-
9project/plugins.sbt
-
35src/it/scala/wow/doge/http4sdemo/MonixBioSuite.scala
-
21src/main/resources/application.conf
-
1src/main/scala/wow/doge/http4sdemo/Migrate.scala
-
1src/test/scala/wow/doge/http4sdemo/LibraryControllerSpec.scala
@ -0,0 +1 @@ |
|||||
|
rules = [OrganizeImports] |
@ -1,16 +1,15 @@ |
|||||
// addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.14") |
// addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.14") |
||||
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") |
|
||||
|
|
||||
// https://github.com/tototoshi/sbt-slick-codegen |
|
||||
libraryDependencies += "com.h2database" % "h2" % "1.4.196" |
libraryDependencies += "com.h2database" % "h2" % "1.4.196" |
||||
libraryDependencies += "org.postgresql" % "postgresql" % "42.2.18" |
libraryDependencies += "org.postgresql" % "postgresql" % "42.2.18" |
||||
|
|
||||
|
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") |
||||
addSbtPlugin("com.github.tototoshi" % "sbt-slick-codegen" % "1.4.0") |
addSbtPlugin("com.github.tototoshi" % "sbt-slick-codegen" % "1.4.0") |
||||
// Database migration |
|
||||
// https://github.com/flyway/flyway-sbt |
|
||||
addSbtPlugin("io.github.davidmweber" % "flyway-sbt" % "7.4.0") |
addSbtPlugin("io.github.davidmweber" % "flyway-sbt" % "7.4.0") |
||||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.23") |
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.23") |
||||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.0") |
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.0") |
||||
|
|
||||
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") |
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") |
||||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") |
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") |
||||
|
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") |
||||
|
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") |
||||
|
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "2.4.13") |
@ -1,35 +0,0 @@ |
|||||
package wow.doge.http4sdemo |
|
||||
|
|
||||
import cats.syntax.all._ |
|
||||
import io.odin.consoleLogger |
|
||||
import io.odin.fileLogger |
|
||||
import io.odin.syntax._ |
|
||||
import monix.bio.Task |
|
||||
import monix.execution.Scheduler |
|
||||
|
|
||||
import scala.concurrent.Future |
|
||||
import munit.TestOptions |
|
||||
import cats.effect.Resource |
|
||||
import io.odin.Logger |
|
||||
|
|
||||
trait MonixBioSuite extends munit.TaglessFinalSuite[Task] { |
|
||||
override protected def toFuture[A](f: Task[A]): Future[A] = { |
|
||||
implicit val s = Scheduler.global |
|
||||
f.runToFuture |
|
||||
} |
|
||||
|
|
||||
def loggerFixture(fileName: Option[String] = None)(implicit |
|
||||
enc: sourcecode.Enclosing |
|
||||
) = |
|
||||
ResourceFixture( |
|
||||
consoleLogger[Task]().withAsync() |+| fileLogger[Task]( |
|
||||
fileName.getOrElse(enc.value.split("#").head + ".log") |
|
||||
), |
|
||||
( |
|
||||
options: TestOptions, |
|
||||
value: Logger[Task] |
|
||||
) => Task(options.name), |
|
||||
(_: Logger[Task]) => Task.unit |
|
||||
) |
|
||||
|
|
||||
} |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue