When I run sbt assembly
the tests are not run. How can I make the tests to run before running the assembly task?
1 Answer
From the documentation at https://github.com/sbt/sbt-assembly#assembly-task:
To run the test during assembly,
lazy val app = (project in file("app")) .settings( assembly / test := (Test / test).value, // more settings here ... )
-
Thanks! That worked for the
app
subproject, but the problem now is that I have multiple subprojects and I would like to run tests for all of them. Onlyapp
has assembly configured, the others have.disablePlugins(AssemblyPlugin)
. Commented Dec 8, 2021 at 8:42 -
Why not run explicitly thetm tests then?
sbt test assembly
for instance.– Gaël JCommented Dec 8, 2021 at 18:50 -