Skip to content

Commit da975a6

Browse files
committed
Make build-macros[_].test.testNegativeCompilation run separately
1 parent 1f7ad34 commit da975a6

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
retention-days: 2
4040
- name: Cross compile everything
4141
run: ./mill -i '__[_].compile'
42+
- name: Build macros negative compilation tests
43+
run: ./mill -i build-macros[_].test.testNegativeCompilation
4244
- name: Unit tests
4345
run: ./mill -i unitTests
4446
- name: Convert Mill test reports to JUnit XML format

build.mill.scala

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -313,19 +313,11 @@ trait BuildMacros extends ScalaCliCrossSbtModule
313313
}
314314

315315
object test extends ScalaCliTests {
316-
317-
// Is there a better way to add task dependency to test?
318-
def test(args: String*): Command[(String, Seq[TestResult])] = Task.Command {
319-
val res = super.test(args: _*)()
320-
testNegativeCompilation()()
321-
res
322-
}
323-
324316
def scalacOptions: Target[Seq[String]] = Task {
325317
super.scalacOptions() ++ asyncScalacOptions(scalaVersion())
326318
}
327319

328-
def testNegativeCompilation(): Command[Unit] = Task.Command {
320+
def testNegativeCompilation(): Command[Unit] = Task.Command(exclusive = true) {
329321
val base = Task.workspace / "modules" / "build-macros" / "src"
330322
val negativeTests = Seq(
331323
"MismatchedLeft.scala" -> Seq(

0 commit comments

Comments
 (0)