diff --git a/.travis.yml b/.travis.yml index 6ecd6bca73..83afb76816 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,6 +48,10 @@ env: cache: directories: + - $HOME/.m2 - $HOME/.ivy2/cache - - $HOME/.sbt/boot + - $HOME/.sbt - $HOME/.coursier + # Pants cache + - $HOME/.cache + diff --git a/build.sbt b/build.sbt index b7654f6861..8365bc7022 100644 --- a/build.sbt +++ b/build.sbt @@ -25,6 +25,7 @@ lazy val kernelSettings = Seq( resolvers ++= Seq( Resolver.sonatypeRepo("releases"), Resolver.sonatypeRepo("snapshots")), + fork in test := true, parallelExecution in Test := false, scalacOptions in (Compile, doc) := (scalacOptions in (Compile, doc)).value.filter(_ != "-Xfatal-warnings") ) ++ warnUnusedImport ++ update2_12 ++ xlint @@ -513,7 +514,18 @@ lazy val publishSettings = Seq( ) ++ credentialSettings ++ sharedPublishSettings ++ sharedReleaseProcess // These aliases serialise the build for the benefit of Travis-CI. -addCommandAlias("buildJVM", "catsJVM/test") + +addCommandAlias("buildKernelJVM", ";kernelJVM/test;kernelLawsJVM/test") + +addCommandAlias("buildCoreJVM", ";macrosJVM/test;coreJVM/test") + +addCommandAlias("buildTestsJVM", ";lawsJVM/test;testkitJVM/test;testsJVM/test;jvm/test") + +addCommandAlias("buildFreeJVM", ";freeJVM/test") + +addCommandAlias("buildAlleycatsJVM", ";alleycatsCoreJVM/test;alleycatsLawsJVM/test;alleycatsTestsJVM/test") + +addCommandAlias("buildJVM", ";buildKernelJVM;buildCoreJVM;buildTestsJVM;buildFreeJVM;buildAlleycatsJVM") addCommandAlias("validateJVM", ";scalastyle;buildJVM;mimaReportBinaryIssues;makeMicrosite") diff --git a/kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala b/kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala index b5cf16a036..f7f45ae3af 100644 --- a/kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala +++ b/kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala @@ -87,9 +87,13 @@ class Tests extends FunSuite with Discipline { // The scalacheck defaults (100,100) are too high for scala-js. final val PropMaxSize: PosZInt = if (Platform.isJs) 10 else 100 final val PropMinSuccessful: PosInt = if (Platform.isJs) 10 else 100 + final val PropWorkers: PosInt = if (Platform.isJvm) PosInt(2) else PosInt(1) implicit override val generatorDrivenConfig: PropertyCheckConfiguration = - PropertyCheckConfiguration(minSuccessful = PropMinSuccessful, sizeRange = PropMaxSize) + PropertyCheckConfiguration( + minSuccessful = PropMinSuccessful, + sizeRange = PropMaxSize, + workers = PropWorkers) {