sbt testRuns the full ScalaTest suite: unit tests under src/test/scala/... plus heavier cases in the integration/ package. Tests are forked and serial (Test / parallelExecution := false) so LibTorch / JavaCPP natives stay stable.
Prefer Temurin / OpenJDK 21 locally and in CI. JDK 25+ has been seen to SIGSEGV mid-genmove with LibTorch in longer GTP sessions.
GitHub Actions (Linux): Dual-ResNet / LibTorch construction currently aborts on GHA runners with glibc malloc(): unaligned tcache chunk detected, after which forked sbt test hangs. CI therefore skips suites that construct or load Storch models (CI=true unless SCALPHAGO_NATIVE_TESTS=true). Run the full suite locally on macOS / a known-good Linux host.
# Fast board / rules
sbt "testOnly org.deeplearning4j.scalphagozero.board.*"
# Agents / MCTS (mostly stubs; a few create tiny Dual-ResNets)
sbt "testOnly org.deeplearning4j.scalphagozero.agents.*"
# One integration suite
sbt "testOnly org.deeplearning4j.scalphagozero.integration.GtpIntegrationTest"
sbt "testOnly org.deeplearning4j.scalphagozero.integration.SelfPlayIntegrationTest"These load Dual-ResNet checkpoints or run self-play and are slower than pure board/encoder tests:
integration/GtpIntegrationTest,ScalphaGoEngineTestintegration/SelfPlayIntegrationTest,TrainIntegrationTest,ModelSaveLoadIntegrationTestml/PolicyValueModelsTest,AgzFidelityTest(tiny net create), CUDA parity (StorchCudaParityTest)
There is no separate sbt IntegrationTest config; everything runs under sbt test.
sbt -Dscalphago.cuda=true testSee gpu.md. GPU tests use assume(torch.cuda.isAvailable) where needed.
sbt coverage test coverageReportHTML report: target/scala-*/scoverage-report/index.html. CI uploads this as an artifact; there is no coverage floor yet.