Skip to content

Commit

Permalink
#395 - bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
regis-leray committed Apr 9, 2024
1 parent fa3d201 commit 21ca24a
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['adopt@1.8']
scala: ['2.12.15', '2.13.8', '3.1.2']
java: ['amazon-corretto@1.17']
scala: ['2.12.15', '2.13.13', '3.3.3']
steps:
- name: Checkout current branch
uses: actions/[email protected]
Expand All @@ -72,7 +72,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['11', '17']
java: ['17', '21']
steps:
- name: Checkout current branch
uses: actions/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -422,3 +422,4 @@ website/static/api
.minio.sys/

.vscode/
/zio-s3/src/test/scala/zio/s3/S3App.scala
14 changes: 4 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ inThisBuild(
addCommandAlias("fmt", "all scalafmtSbt scalafmt test:scalafmt")
addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck")

val zioVersion = "2.0.2"
val awsVersion = "2.16.61"
val zioVersion = "2.0.21"
val awsVersion = "2.23.4"

lazy val root =
project.in(file(".")).settings(publish / skip := true).aggregate(`zio-s3`, docs)
Expand All @@ -38,19 +38,13 @@ lazy val `zio-s3` = project
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-streams" % zioVersion,
"dev.zio" %% "zio-nio" % "2.0.0",
"dev.zio" %% "zio-interop-reactivestreams" % "2.0.0",
"dev.zio" %% "zio-nio" % "2.0.2",
"dev.zio" %% "zio-interop-reactivestreams" % "2.0.2",
"software.amazon.awssdk" % "s3" % awsVersion,
"software.amazon.awssdk" % "sts" % awsVersion,
"dev.zio" %% "zio-test" % zioVersion % Test,
"dev.zio" %% "zio-test-sbt" % zioVersion % Test
),
libraryDependencies ++= {
if (scalaVersion.value == ScalaDotty)
Seq()
else
Seq("org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1")
},
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
)

Expand Down
14 changes: 7 additions & 7 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import scalafix.sbt.ScalafixPlugin.autoImport._

object BuildHelper {
val Scala212 = "2.12.15"
val Scala213 = "2.13.8"
val ScalaDotty = "3.1.2"
val Scala213 = "2.13.13"
val ScalaDotty = "3.3.3"

private val stdOptions = Seq(
"-deprecation",
Expand Down Expand Up @@ -117,13 +117,13 @@ object BuildHelper {
crossScalaVersions := Seq(Scala212, Scala213),
ThisBuild / scalaVersion := Scala213,
scalacOptions := stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value),
semanticdbEnabled := scalaVersion.value != ScalaDotty, // enable SemanticDB
semanticdbOptions += "-P:semanticdb:synthetics:on",
semanticdbVersion := scalafixSemanticdb.revision, // use Scalafix compatible version
//semanticdbEnabled := scalaVersion.value != ScalaDotty, // enable SemanticDB
//semanticdbOptions += "-P:semanticdb:synthetics:on",
//semanticdbVersion := scalafixSemanticdb.revision, // use Scalafix compatible version
ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaVersion.value),
ThisBuild / scalafixDependencies ++= List(
"com.github.liancheng" %% "organize-imports" % "0.4.3",
"com.github.vovapolu" %% "scaluzzi" % "0.1.15"
"com.github.liancheng" %% "organize-imports" % "0.6.0",
"com.github.vovapolu" %% "scaluzzi" % "0.1.23"
),
Test / parallelExecution := true,
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.7.1
sbt.version = 1.9.9
2 changes: 1 addition & 1 deletion zio-s3/src/main/scala/zio/s3/Test.scala
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ object Test {

override def getObject(bucketName: String, key: String): Stream[S3Exception, Byte] =
ZStream
.scoped(ZIO.fromAutoCloseable(ZIO.attempt(new FileInputStream((path / bucketName / key).toFile))))
.scoped[Any](ZIO.fromAutoCloseable(ZIO.attempt(new FileInputStream((path / bucketName / key).toFile))))
.flatMap(ZStream.fromInputStream(_, 2048))
.refineOrDie {
case e: FileNotFoundException => fileNotFound(e)
Expand Down
28 changes: 14 additions & 14 deletions zio-s3/src/test/scala/zio/s3/S3ProvidersTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,80 +27,80 @@ object S3ProvidersTest extends ZIOSpecDefault {
suite("Providers")(
test("basic credentials") {
ZIO
.scoped(basic("k", "v").map(_.resolveCredentials()))
.scoped[Any](basic("k", "v").map(_.resolveCredentials()))
.map(res => assertTrue(res == AwsBasicCredentials.create("k", "v")))
},
test("session credentials") {
ZIO
.scoped(session("k", "v", "t").map(_.resolveCredentials()))
.scoped[Any](session("k", "v", "t").map(_.resolveCredentials()))
.map(res => assertTrue(res == AwsSessionCredentials.create("k", "v", "t")))
},
test("basic credentials default fallback const") {
ZIO
.scoped((env <> basic("k", "v")).map(_.resolveCredentials()))
.scoped[Any]((env <> basic("k", "v")).map(_.resolveCredentials()))
.map(res => assertTrue(res == AwsBasicCredentials.create("k", "v")))
},
test("cred in system properties") {
for {
cred <- ZIO.scoped(system.flatMap(p => ZIO.attempt(p.resolveCredentials())))
cred <- ZIO.scoped[Any](system.flatMap(p => ZIO.attempt(p.resolveCredentials())))
} yield assertTrue(cred == AwsBasicCredentials.create("k1", "s1"))
} @@ flaky @@ around(
setProps(("aws.accessKeyId", "k1"), ("aws.secretAccessKey", "s1")),
unsetProps("aws.accessKeyId", "aws.secretAccessKey")
),
test("no cred in system properties") {
for {
failure <- ZIO.scoped(system).flip.map(_.getMessage)
failure <- ZIO.scoped[Any](system).flip.map(_.getMessage)
} yield assert(failure)(isNonEmptyString)
} @@ around(
unsetProps("aws.accessKeyId", "aws.secretAccessKey"),
ZIO.unit
),
test("no cred in environment properties") {
for {
failure <- ZIO.scoped(env).flip.map(_.getMessage)
failure <- ZIO.scoped[Any](env).flip.map(_.getMessage)
} yield assert(failure)(isNonEmptyString)
},
test("no cred in profile") {
for {
failure <- ZIO.scoped(profile).flip.map(_.getMessage)
failure <- ZIO.scoped[Any](profile).flip.map(_.getMessage)
} yield assert(failure)(isNonEmptyString)
},
test("no cred in named profile") {
for {
failure <- ZIO.scoped(profile(Some("name"))).flip.map(_.getMessage)
failure <- ZIO.scoped[Any](profile(Some("name"))).flip.map(_.getMessage)
} yield assert(failure)(isNonEmptyString)
},
test("no cred in container") {
for {
failure <- ZIO.scoped(container).flip.map(_.getMessage)
failure <- ZIO.scoped[Any](container).flip.map(_.getMessage)
} yield assert(failure)(isNonEmptyString)
},
test("no cred in instance profile credentials") {
for {
failure <- ZIO.scoped(instanceProfile).flip.map(_.getMessage)
failure <- ZIO.scoped[Any](instanceProfile).flip.map(_.getMessage)
} yield assert(failure)(isNonEmptyString)
},
test("no cred in webidentity credentials") {
for {
failure <- ZIO.scoped(webIdentity).flip.map(_.getMessage)
failure <- ZIO.scoped[Any](webIdentity).flip.map(_.getMessage)
} yield assert(failure)(isNonEmptyString)
},
test("settings from invalid creds") {
for {
failure <- ZIO
.scoped(
.scoped[Any](
settings(
Region.AF_SOUTH_1,
ZIO.scoped(system).map(_.resolveCredentials())
ZIO.scoped[Any](system).map(_.resolveCredentials())
).build
)
.flip
} yield assert(failure.getMessage)(isNonEmptyString)
},
test("no cred when chain all providers") {
for {
failure <- ZIO.scoped(default.flatMap(c => ZIO.attempt(c.resolveCredentials()))).flip.map(_.getMessage)
failure <- ZIO.scoped[Any](default.flatMap(c => ZIO.attempt(c.resolveCredentials()))).flip.map(_.getMessage)
} yield assert(failure)(isNonEmptyString)
}
) @@ sequential
Expand Down

0 comments on commit 21ca24a

Please sign in to comment.