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

refactor: migrate to zio-json + update all #438

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
389 changes: 199 additions & 190 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .sbtopts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Dsbt.io.implicit.relative.glob.conversion=allow
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ In some cases, we may have multiple submodules in our project and we want to tes

The `ciTargetScalaVersions` setting key is used to define a mapping of project names to the Scala versions that should be used for testing phase of continuous integration (CI).

For example, suppose we have a project with the name "submoduleA" and we want to test it against Scala `2.12.19`, and for the "submoduleB" we want to test it against Scala `2.12.19` and `2.13.13` and `3.3.3`, We can define the `ciTargetScalaVersions` setting as follows:
For example, suppose we have a project with the name "submoduleA" and we want to test it against Scala `2.12.20`, and for the "submoduleB" we want to test it against Scala `2.12.20` and `2.13.15` and `3.3.4`, We can define the `ciTargetScalaVersions` setting as follows:

```scala
ThisBuild / ciTargetScalaVersions := Map(
"submoduleA" -> Seq("2.12.19"),
"submoduleB" -> Seq("2.12.19", "2.13.13", "3.3.3")
"submoduleA" -> Seq("2.12.20"),
"submoduleB" -> Seq("2.12.20", "2.13.15", "3.3.4")
)
```

Expand Down Expand Up @@ -206,10 +206,10 @@ test:
matrix:
java: ['11', '17', '21']
scala-project:
- ++2.12.19 submoduleA
- ++2.12.19 submoduleB
- ++2.13.13 submoduleB
- ++3.3.3 submoduleB
- ++2.12.20 submoduleA
- ++2.12.20 submoduleB
- ++2.13.15 submoduleB
- ++3.3.4 submoduleB
steps:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
Expand Down
14 changes: 7 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ In some cases, we may have multiple submodules in our project and we want to tes

The `ciTargetScalaVersions` setting key is used to define a mapping of project names to the Scala versions that should be used for testing phase of continuous integration (CI).

For example, suppose we have a project with the name "submoduleA" and we want to test it against Scala `2.12.19`, and for the "submoduleB" we want to test it against Scala `2.12.19` and `2.13.13` and `3.3.3`, We can define the `ciTargetScalaVersions` setting as follows:
For example, suppose we have a project with the name "submoduleA" and we want to test it against Scala `2.12.20`, and for the "submoduleB" we want to test it against Scala `2.12.20` and `2.13.15` and `3.3.4`, We can define the `ciTargetScalaVersions` setting as follows:

```scala
ThisBuild / ciTargetScalaVersions := Map(
"submoduleA" -> Seq("2.12.19"),
"submoduleB" -> Seq("2.12.19", "2.13.13", "3.3.3")
"submoduleA" -> Seq("2.12.20"),
"submoduleB" -> Seq("2.12.20", "2.13.15", "3.3.4")
)
```

Expand Down Expand Up @@ -205,10 +205,10 @@ test:
matrix:
java: ['11', '17', '21']
scala-project:
- ++2.12.19 submoduleA
- ++2.12.19 submoduleB
- ++2.13.13 submoduleB
- ++3.3.3 submoduleB
- ++2.12.20 submoduleA
- ++2.12.20 submoduleB
- ++2.13.15 submoduleB
- ++3.3.4 submoduleB
steps:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
Expand Down
8 changes: 4 additions & 4 deletions project/Versions.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
object Versions {
val Scala212 = "2.12.19"
val Scala213 = "2.13.13"
val Scala3 = "3.3.3"
val zio = "2.0.21"
val Scala212 = "2.12.20"
val Scala213 = "2.13.15"
val Scala3 = "3.3.4"
val zio = "2.1.13"
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.10.1
sbt.version = 1.10.5
19 changes: 11 additions & 8 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
// Build Server Plugins
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.6.0")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "2.0.5")

// Linting Plugins
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.13.0")
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1")

// Versioning and Release Plugins
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

// Docs Plugins
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.4")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.1")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")

// Cross-Compiler Plugins
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.4")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.5")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")
addSbtPlugin("org.portable-scala" % "sbt-platform-deps" % "1.0.2")

// Benchmarking Plugins
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7")

libraryDependencies += "org.snakeyaml" % "snakeyaml-engine" % "2.7"
libraryDependencies += "dev.zio" %% "zio" % "2.1.8"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.16.0"
libraryDependencies += "org.snakeyaml" % "snakeyaml-engine" % "2.8"
libraryDependencies += "dev.zio" %% "zio" % "2.1.13"
libraryDependencies += "dev.zio" %% "zio-json" % "0.7.3+19-9339fbba-SNAPSHOT"
libraryDependencies += "dev.zio" %% "zio-json-yaml" % "0.7.3+19-9339fbba-SNAPSHOT"

resolvers ++= Resolver.sonatypeOssRepos("snapshots")
7 changes: 5 additions & 2 deletions zio-sbt-ci/build.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
libraryDependencies += "dev.zio" %% "zio" % "2.1.8"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.16.0"
libraryDependencies += "dev.zio" %% "zio" % "2.1.13"
libraryDependencies += "dev.zio" %% "zio-json" % "0.7.3+19-9339fbba-SNAPSHOT"
libraryDependencies += "dev.zio" %% "zio-json-yaml" % "0.7.3+19-9339fbba-SNAPSHOT"

resolvers ++= Resolver.sonatypeOssRepos("snapshots")
5 changes: 3 additions & 2 deletions zio-sbt-ci/src/main/scala/zio/sbt/V.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ object V {
Map(
"peter-evans/create-pull-request" -> "v6",
"zio/generate-github-app-token" -> "v1.0.0",
"pierotofy/set-swap-space" -> "master",
"pierotofy/set-swap-space" -> "49819abfb41bd9b44fb781159c033dba90353a7c", // 1.0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it is better to mention the version here: "v1.0"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not sure about the correct tagging. The github tag is 1.0 and the marketplace says v1.0. I just wanted to prevent the action from changing. I can try and make it v1.0 or 1.0.

"actions/checkout" -> "v4",
"coursier/cache-action" -> "v6",
"actions/setup-java" -> "v4",
"actions/setup-node" -> "v4"
"actions/setup-node" -> "v4",
"sbt/setup-sbt" -> "v1"
).map { case (k, v) => (k, s"$k@$v") }.apply(packageName)
}
Loading
Loading