Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directly run githubWorkflowCheck #364

Merged
merged 1 commit into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Check that workflows are up to date
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' 'project /' githubWorkflowCheck
run: sbt githubWorkflowCheck

- name: Check headers and formatting
if: matrix.java == 'temurin@8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,8 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
"Build and Test",
githubWorkflowJobSetup.value.toList :::
githubWorkflowBuildPreamble.value.toList :::
WorkflowStep.Sbt(
List("project /", "githubWorkflowCheck"),
WorkflowStep.Run(
List(s"${sbt.value} githubWorkflowCheck"),
name = Some("Check that workflows are up to date")) ::
githubWorkflowBuild.value.toList :::
githubWorkflowBuildPostamble.value.toList :::
Expand Down Expand Up @@ -758,12 +758,15 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
s"github.event_name != 'pull_request' && $publicationCond"
}

private val generateCiContents = Def task {
val sbt = if (githubWorkflowUseSbtThinClient.value) {
private val sbt = Def.setting {
if (githubWorkflowUseSbtThinClient.value) {
githubWorkflowSbtCommand.value + " --client"
} else {
githubWorkflowSbtCommand.value
}
}

private val generateCiContents = Def task {
compileWorkflow(
"Continuous Integration",
githubWorkflowTargetBranches.value.toList,
Expand All @@ -772,7 +775,7 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
githubWorkflowPREventTypes.value.toList,
githubWorkflowEnv.value,
githubWorkflowGeneratedCI.value.toList,
sbt
sbt.value
)
}

Expand Down