diff --git a/.github/labeler.yml b/.github/labeler.yml index 9e3722f..715fef1 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,9 +1,5 @@ version: 1 labels: - - label: "AnyTitleAndSmall" - title: ".*" - size: - below: 100 - label: "TestFileMatch" files: - "cmd/.*.go" diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index ef581ac..e38204f 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -13,4 +13,4 @@ jobs: name: automerge uses: "pascalgn/automerge-action@v0.15.6" env: - GITHUB_TOKEN: "${{ secrets.REPO_GITHUB_TOKEN }}" \ No newline at end of file + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd6cdf0..ac8e50b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: srvaroa/labeler@master env: - GITHUB_TOKEN: "${{ secrets.REPO_GITHUB_TOKEN }}" + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" ci: # run on external PRs, but not on internal PRs since those will be run by push to branch diff --git a/build.sbt b/build.sbt index 9dd96ef..0959633 100644 --- a/build.sbt +++ b/build.sbt @@ -1,12 +1,11 @@ import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings +import Dependencies._ lazy val commonSettings = commonSmlBuildSettings ++ Seq( organization := "com.softwaremill.xxx", scalaVersion := "2.13.12" ) -val scalaTest = "org.scalatest" %% "scalatest" % "3.2.17" % Test - lazy val rootProject = (project in file(".")) .settings(commonSettings: _*) .settings(publishArtifact := false, name := "root") @@ -16,7 +15,14 @@ lazy val core: Project = (project in file("core")) .settings(commonSettings: _*) .settings( name := "core", - libraryDependencies ++= Seq( - scalaTest - ) + libraryDependencies ++= + scalaTest ++ + cats ++ + http4s + ) + +addCommandAlias( + "format", + "; scalafmtAll ; scalafmtSbt; Test / scalafmtAll" +) diff --git a/core/src/main/scala/Main.scala b/core/src/main/scala/Main.scala index fa06614..f56b999 100644 --- a/core/src/main/scala/Main.scala +++ b/core/src/main/scala/Main.scala @@ -1,5 +1,3 @@ - - object Main { def main(args: Array[String]) = println("hello world") -} \ No newline at end of file +} diff --git a/core/src/test/scala/MySpec.scala b/core/src/test/scala/MySpec.scala index 0263c53..c44098b 100644 --- a/core/src/test/scala/MySpec.scala +++ b/core/src/test/scala/MySpec.scala @@ -1,8 +1,7 @@ - import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec class MySpec extends AnyFlatSpec with Matchers { "This" should "do" in { - 1 + 2 should be (3) + 1 + 2 should be(3) } -} \ No newline at end of file +} diff --git a/project/Dependencies.scala b/project/Dependencies.scala new file mode 100644 index 0000000..37d2076 --- /dev/null +++ b/project/Dependencies.scala @@ -0,0 +1,20 @@ +import sbt.* + +object Dependencies { + + lazy val cats: Seq[ModuleID] = Seq( + "org.typelevel" %% "cats-core" % Versions.cats, + "org.typelevel" %% "cats-effect" % Versions.catsEffect + ) + + lazy val http4s: Seq[ModuleID] = Seq( + "org.http4s" %% "http4s-ember-client" % Versions.http4s, + "org.http4s" %% "http4s-ember-server" % Versions.http4s, + "org.http4s" %% "http4s-circe" % Versions.http4s, + "org.http4s" %% "http4s-dsl" % Versions.http4s + ) + + lazy val scalaTest: Seq[ModuleID] = Seq( + "org.scalatest" %% "scalatest" % Versions.scalaTest % Test + ) +} diff --git a/project/Versions.scala b/project/Versions.scala index 703fe04..8f4d333 100644 --- a/project/Versions.scala +++ b/project/Versions.scala @@ -1,3 +1,6 @@ object Versions { + val cats = "2.10.0" + val catsEffect = "3.5.2" val http4s = "0.23.21" + val scalaTest = "3.2.17" }