This template is a version of scala-library-template but focused only on Scala 3
This is a template repository with some of the learnings from OSS Scala ecosystem applied.
JVM | Scala.js (1.x) | Scala Native (0.4.0) | |
---|---|---|---|
Scala 3.2.x | ✅ | ✅ | ✅ |
-
Github Actions is used for CI and Releases
- On pushes and pull requests,
sbt ci
command is ran (more about it later) - On tags,
sbt ci-release
command is ran, from sbt-ci-release - Version is determined using sbt-dynver
- On pushes and pull requests,
-
Syntax formatting is verified using sbt-scalafmt
-
Imports are organised and checked using organize-imports Scalafix rule
- Several other Scalafix rules are enabled by default, see .scalafix.conf
-
Compilation flags are set using sbt-tpolecat
-
Explicit dependencies are checked using sbt-explicit-dependencies
-
Presence of Licence header is checked using sbt-header
-
Binary incompatibilities among dependencies are checked using sbt-missinglink
-
Build matrix is managed using sbt-projectmatrix
A preCI
command is added - which will reformat, apply scalafix rules, create licence headers, run missinglink, etc.
This command is designed to be run before pushing, not on CI.
sbt ci
command only runs checks, it never changes sources.