Skip to content

Commit

Permalink
Add sequential per module execution for sbt scripted as a workaround …
Browse files Browse the repository at this point in the history
…for CI issues
  • Loading branch information
ptrdom committed Nov 18, 2023
1 parent 332f4dc commit 1c28e40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
- name: Setup pnpm
run: corepack prepare [email protected] --activate
- name: Run tests
run: sbt scalafmtSbtCheck scalafmtCheckAll test scripted
run: sbt scalafmtSbtCheck scalafmtCheckAll test scriptedSequentialPerModule
11 changes: 11 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,14 @@ lazy val `sbt-web-scalajs-vite` =
}
)
.dependsOn(`sbt-scalajs-vite`)

// workaround for https://github.com/sbt/sbt/issues/7431
TaskKey[Unit]("scriptedSequentialPerModule") := {
Def.taskDyn {
val projects: Seq[ProjectReference] = `scalajs-vite`.aggregate
Def
.sequential(
projects.map(p => Def.taskDyn((p / scripted).toTask("")))
)
}.value
}

0 comments on commit 1c28e40

Please sign in to comment.