Skip to content

Commit

Permalink
chore(format): add in formatting to build and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ckipp01 committed Jan 1, 2023
1 parent 7a32dde commit 335c63b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Introduce scalafmt
7a32dde8ef120673a30f22512b191d6706cc70f1
14 changes: 14 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ jobs:
- name: Check Binary Compatibility
run: ./mill -i --disable-ticker __.mimaReportBinaryIssues

check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17

- run: ./mill -i -k __.checkFormat

publish-sonatype:
if: github.repository == 'com-lihaoyi/scalatags' && contains(github.ref, 'refs/tags/')
needs: test
Expand Down
3 changes: 2 additions & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import de.tobiasroeser.mill.vcs.version.VcsVersion
import $ivy.`com.github.lolgab::mill-mima::0.0.13`
import com.github.lolgab.mill.mima._
import mill.scalalib.api.Util.isScala3
import mill.scalalib.scalafmt._

val dottyVersions = sys.props.get("dottyVersion").toList

Expand Down Expand Up @@ -41,7 +42,7 @@ trait ScalatagsPublishModule extends PublishModule with MimaCheck {
)
}

trait Common extends CrossScalaModule {
trait Common extends CrossScalaModule with ScalafmtModule {
def millSourcePath = super.millSourcePath / offset
def ivyDeps = Agg(
ivy"com.lihaoyi::sourcecode::0.3.0",
Expand Down

0 comments on commit 335c63b

Please sign in to comment.