From ae3b8a0d0bed4bcfc16f02c5190f96d8ad04f43b Mon Sep 17 00:00:00 2001 From: Vadim Chelyshov Date: Thu, 21 Apr 2022 21:16:46 +0300 Subject: [PATCH] chore: get rid of test groups --- build.sbt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 0bfd15efde3..26b3810c942 100644 --- a/build.sbt +++ b/build.sbt @@ -605,9 +605,20 @@ lazy val unit = project .in(file("tests/unit")) .settings( testSettings, - Test / testOptions ++= Seq( - Tests.Filter(name => isInTestShard(name, sLog.value)) - ), + Test / testOptions ++= { + val allTests = (Test / definedTestNames).value.sorted + if (isCI) { + val remainder = 2 - System.getenv("TEST_SHARD").toInt + val include = + allTests.zipWithIndex + .filter { case (_, i) => (i + 1) % 2 == remainder } + .map(_._1) + Seq( + Tests.Filter(name => isInTestShard(name, sLog.value)) + ) + } else + Seq.empty + }, sharedSettings, Test / javaOptions += "-Xmx2G", libraryDependencies ++= List(