Skip to content

Commit 91173e0

Browse files
committed
fix: explicitly run headerCreateAll before test
1 parent 73b5146 commit 91173e0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
run: sbt scalafmtCheckAll 'project /' scalafmtSbtCheck
6969

7070
- name: Test
71-
run: sbt freeGen2 test
71+
run: sbt freeGen2 headerCreateAll test
7272

7373
- name: Check binary compatibility
7474
if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-22.04'

build.sbt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ ThisBuild / githubWorkflowBuild := {
5959
current.map {
6060
// Assume step "Test" exists.
6161
// Prepend command "freeGen2" to the command list of that step.
62+
// Also make sure we run headerCreateAll first and let it complete for all subprojects,
63+
// otherwise "test" might see half-written files
6264
case testStep: WorkflowStep.Sbt if testStep.name.contains("Test") =>
63-
WorkflowStep.Sbt("freeGen2" :: testStep.commands, name = Some("Test"))
65+
WorkflowStep.Sbt("freeGen2" :: "headerCreateAll" :: testStep.commands, name = Some("Test"))
6466
case other => other
6567
}
6668
}

0 commit comments

Comments
 (0)