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

Update dependencies #546

Merged
merged 8 commits into from
Nov 28, 2024
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
45 changes: 29 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ jobs:
fail-fast: false
steps:
- name: Checkout current branch
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
uses: actions/setup-java@v4.5.0
with:
distribution: temurin
java-version: 11
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Lint code
Expand All @@ -32,47 +36,51 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['temurin:17', 'temurin:21']
scala: ['3.3.1', '2.13.12', '2.12.19']
java: ['11', '21']
scala: ['3.3', '2.13', '2.12']
env:
AWS_ACCESS_KEY_ID: dummykey
AWS_SECRET_ACCESS_KEY: dummykey
AWS_REGION: us-east-1
steps:
- uses: actions/checkout@v3.0.0
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- uses: coursier/setup-action@v1
- name: Setup Scala and Java
uses: actions/setup-java@v4.5.0
with:
jvm: ${{ matrix.java }}
distribution: temurin
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Run tests
run: sbt -J-XX:+UseG1GC -J-Xmx6g -J-Xms6g -J-Xss16m ++${{ matrix.scala }}! test
run: sbt -J-XX:+UseG1GC -J-Xmx6g -J-Xms6g -J-Xss16m "++${{ matrix.scala }}; test"
- name: Run DynamoDBLocal
run: docker compose -f docker/docker-compose.yml up -d
- name: Run integration tests
run: sbt -J-XX:+UseG1GC -J-Xmx6g -J-Xms6g -J-Xss16m ++${{ matrix.scala }}! it:test
run: sbt -J-XX:+UseG1GC -J-Xmx6g -J-Xms6g -J-Xss16m "++${{ matrix.scala }}; it:test"

mdoc:
runs-on: ubuntu-20.04
timeout-minutes: 30
if: github.event_name != 'pull_request'
steps:
- name: Checkout current branch
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Setup Scala and Java
uses: actions/setup-java@v3.9.0
uses: actions/setup-java@v4.5.0
with:
distribution: temurin
java-version: 17
java-version: 11
check-latest: true
- name: Setup GPG
uses: olafurpg/setup-gpg@v3
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Check Document Generation
run: ./sbt docs/compileDocs
run: sbt -J-XX:+UseG1GC -J-Xmx6g -J-Xms6g -J-Xss16m docs/compileDocs

ci:
runs-on: ubuntu-20.04
Expand All @@ -87,10 +95,15 @@ jobs:
needs: [ci]
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3.0.0
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v13
- name: Setup Scala and Java
uses: actions/setup-java@v4.5.0
with:
distribution: temurin
java-version: 11
check-latest: true
- run: sbt -J-XX:+UseG1GC -J-Xmx6g -J-Xms6g -J-Xss16m ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
Expand Down
24 changes: 13 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import BuildHelper._
import BuildHelper.*

inThisBuild(
List(
Expand Down Expand Up @@ -31,18 +31,18 @@ inThisBuild(
addCommandAlias("fmt", "all scalafmtSbt scalafmt test:scalafmt")
addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck")

val zioVersion = "2.1.11"
val zioAwsVersion = "7.28.26.1"
val zioVersion = "2.1.13"
val zioAwsVersion = "7.28.29.6"
val zioSchemaVersion = "1.5.0"
val zioPreludeVersion = "1.0.0-RC31"
val zioPreludeVersion = "1.0.0-RC35"
val zioInteropCats3Version = "23.1.0.3"
val catsEffect3Version = "3.5.4"
val catsEffect3Version = "3.5.7"
val fs2Version = "3.11.0"

lazy val root =
project
.in(file("."))
.settings(skip in publish := true)
.settings(publish / skip := true)
.aggregate(zioDynamodb, zioDynamodbCe, zioDynamodbJson, examples, docs)

lazy val zioDynamodb = module("zio-dynamodb", "dynamodb")
Expand All @@ -51,7 +51,7 @@ lazy val zioDynamodb = module("zio-dynamodb", "dynamodb")
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
resolvers += Resolver.sonatypeRepo("releases"),
resolvers ++= Resolver.sonatypeOssRepos("releases"),
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-prelude" % zioPreludeVersion,
Expand Down Expand Up @@ -270,8 +270,8 @@ lazy val zioDynamodb = module("zio-dynamodb", "dynamodb")

lazy val examples = module("zio-dynamodb-examples", "examples")
.settings(
resolvers += Resolver.sonatypeRepo("releases"),
skip in publish := true,
resolvers ++= Resolver.sonatypeOssRepos("releases"),
publish / skip := true,
fork := true,
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % catsEffect3Version,
Expand All @@ -289,7 +289,7 @@ lazy val zioDynamodbCe =
.settings(buildInfoSettings("zio.dynamodb"))
.configs(IntegrationTest)
.settings(
resolvers += Resolver.sonatypeRepo("releases"),
resolvers ++= Resolver.sonatypeOssRepos("releases"),
fork := true,
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % catsEffect3Version,
Expand All @@ -308,7 +308,7 @@ lazy val zioDynamodbJson =
.settings(buildInfoSettings("zio.dynamodb"))
.configs(IntegrationTest)
.settings(
resolvers += Resolver.sonatypeRepo("releases"),
resolvers ++= Resolver.sonatypeOssRepos("releases"),
fork := true,
libraryDependencies ++= Seq(
"dev.zio" %% "zio-test" % zioVersion % "test",
Expand Down Expand Up @@ -346,3 +346,5 @@ lazy val docs = project
)
.dependsOn(zioDynamodb, zioDynamodbCe, zioDynamodbJson)
.enablePlugins(WebsitePlugin)

Global / onChangedBuildSource := ReloadOnSourceChanges
4 changes: 2 additions & 2 deletions dynamodb/src/it/scala/zio/dynamodb/LiveSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ object LiveSpec extends DynamoDBLocalSpec {

private def pk(item: Item): PrimaryKey =
(item.map.get("id"), item.map.get("num")) match {
case (Some(id), Some(num)) => PrimaryKey("id" -> id, "num" -> num)
case _ => throw new IllegalStateException(s"Both id and num need to present in item $item")
case (Some(id0), Some(num)) => PrimaryKey("id" -> id0, "num" -> num)
case _ => throw new IllegalStateException(s"Both id and num need to present in item $item")
}

private def insertData(tableName: String) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import zio.schema.DeriveSchema
import zio.schema.Schema

import java.net.URI
import scala.annotation.nowarn

/**
* example interop app for stream utils
Expand All @@ -29,6 +30,7 @@ import java.net.URI
* zio-dynamodb-examples/runMain zio.dynamodb.examples.dynamodblocal.CeInteropStreamUtilsExample
* }}}
*/
@nowarn("msg=never used") // False positive warning in Scala 2.13
object CeInteropStreamUtilsExample extends IOApp.Simple {

final case class Person(id: String, name: String)
Expand Down
18 changes: 9 additions & 9 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import sbt._
import sbt.Keys._
import sbtbuildinfo._
import BuildInfoKeys._
import sbt.*
import sbt.Keys.*
import sbtbuildinfo.*
import sbtbuildinfo.BuildInfoKeys.*

object BuildHelper {
// Align with zio-schema since we have a deep dependency on it
val Scala212 = "2.12.19"
val Scala213 = "2.13.12"
val Scala3 = "3.3.1"
private val SilencerVersion = "1.7.17"
val Scala212 = "2.12.20"
val Scala213 = "2.13.15"
val Scala3 = "3.3.4"
private val SilencerVersion = "1.7.19"

private val stdOptions = Seq(
"-encoding",
Expand Down Expand Up @@ -99,7 +99,7 @@ object BuildHelper {
("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided)
.cross(CrossVersion.full),
compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)),
compilerPlugin("org.typelevel" %% "kind-projector" % "0.10.3")
compilerPlugin(("org.typelevel" %% "kind-projector" % "0.13.3").cross(CrossVersion.full))
)
},
incOptions ~= (_.withLogRecompileOnMacro(false))
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.9.9
sbt.version = 1.10.5
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.2")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "2.0.5")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.0")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.4.0-alpha.28")
Expand Down
Loading