1

I'm using Mill and I can't figure out how to run the tests or even compile all Modules at once.

There is clear, but running mill resolve _ does not seem to have a command for it.

For now I run the tests for each Module separately.

Is there a way to achieve this?

pme
  • 14,156
  • 3
  • 52
  • 95

1 Answers1

1

I assume you're talking about ScalaModules and your tests are located in test sub-modules.

Run all tests of your project with:

mill __.test.test

The __ is a wildcard and matches in this case any parent module(s) (like the ** in Ant patterns). The .test.test matches a test target in a module named test.

To compile all modules, run:

mill __.compile

And to run all compile targets and run tests in one go, run:

mill all __.compile __.test.test

Notice, that we need to use the all target here, which accepts multiple targets as arguments. That's needed because mill only accepts a single target or target-pattern and treats any additional command line argument as a parameter for that target.

Tobias Roeser
  • 431
  • 2
  • 8