Skip to content
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
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,47 @@ jobs:

- name: Check binary compatibility
run: sbt mimaReportBinaryIssues

scalafmt:
name: Scalafmt Check
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.18]
java: [temurin@21]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
cache: sbt

- name: Setup Java (temurin@21)
if: matrix.java == 'temurin@21'
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
cache: sbt

- name: Setup Java (temurin@25)
if: matrix.java == 'temurin@25'
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 25
cache: sbt

- name: Setup sbt
uses: sbt/setup-sbt@v1

- name: Check Scala formatting
run: sbt scalafmtCheckAll scalafmtSbtCheck
10 changes: 10 additions & 0 deletions project/Commons.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ object Commons extends ProjectGroup("commons") {
name = Some("Check binary compatibility"),
),
),
githubWorkflowAddedJobs += WorkflowJob(
id = "scalafmt",
name = "Scalafmt Check",
scalas = List(scalaVersion.value),
javas = List(JavaSpec.temurin("21")),
steps = githubWorkflowJobSetup.value.toList :+ WorkflowStep.Sbt(
List("scalafmtCheckAll", "scalafmtSbtCheck"),
name = Some("Check Scala formatting"),
),
),
githubWorkflowBuildPreamble ++= Seq(
WorkflowStep.Use(
UseRef.Public("actions", "setup-node", "v4"),
Expand Down
Loading