Skip to content

Commit bee3b1b

Browse files
committed
Clean usual suspect dependencies on the CI after every test suite to save space
1 parent 9fb0652 commit bee3b1b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

modules/integration/src/test/scala/scala/cli/integration/ScalaCliSuite.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package scala.cli.integration
33
import java.util.concurrent.TimeUnit
44

55
import scala.concurrent.duration.{Duration, FiniteDuration}
6-
import scala.util.Properties
76

87
abstract class ScalaCliSuite extends munit.FunSuite {
98
implicit class BeforeEachOpts(munitContext: BeforeEach) {
@@ -33,8 +32,11 @@ abstract class ScalaCliSuite extends munit.FunSuite {
3332
override def afterAll(): Unit = {
3433
super.afterAll()
3534
// Clean up cached JDKs after all tests have run on Linux native CI runners
36-
if isCI && Properties.isLinux then TestUtil.cleanCachedJdks()
35+
if isCI then TestUtil.cleanCachedJdks()
3736
else System.err.println("Skipping cached JDKs cleanup")
37+
if isCI then TestUtil.cleanCachedUsualSuspectDeps()
38+
else System.err.println("Skipping cached JDKs cleanup")
39+
3840
}
3941
}
4042

modules/integration/src/test/scala/scala/cli/integration/TestUtil.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,4 +465,9 @@ object TestUtil {
465465
System.err.println("Cleaning cached JDKs in Coursier cache…")
466466
cleanCoursierCache(Seq("zulu", "temurin", "adoptium", "corretto", "liberica", "graalvm"))
467467
}
468+
469+
def cleanCachedUsualSuspectDeps(): Unit = {
470+
System.err.println("Cleaning usual suspect dependencies in Coursier cache…")
471+
cleanCoursierCache(Seq("lihaoyi", "plokhotnyuk", "scalameta", "chuusai", "circe", "junit"))
472+
}
468473
}

0 commit comments

Comments
 (0)