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

Fix IntegrationTest deprecation warnings #889

Merged
merged 16 commits into from
Sep 27, 2023
58 changes: 25 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
name: CI
env:
JDK_JAVA_OPTIONS: -XX:+PrintCommandLineFlags
JVM_OPTS: -XX:+PrintCommandLineFlags
'on':
workflow_dispatch: {}
release:
@@ -14,24 +13,23 @@ env:
branches:
- master
pull_request: {}
create: {}
jobs:
build:
name: Build
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v3.13.0
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
@@ -47,16 +45,16 @@ jobs:
continue-on-error: false
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v3.13.0
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
@@ -72,49 +70,43 @@ jobs:
fail-fast: false
matrix:
java:
- '8'
- '11'
- '17'
- '21'
steps:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v3.13.0
with:
distribution: temurin
distribution: corretto
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Test
run: sbt +test
- name: Run Redis
run: docker-compose -f docker/redis-compose.yml up -d
- name: Run Redis cluster
run: docker-compose -f docker/redis-cluster-compose.yml up -d
- name: Run integration tests
run: sbt ++${{ matrix.scala }} IntegrationTest/test
update-readme:
name: Update README
runs-on: ubuntu-latest
continue-on-error: false
if: ${{ github.event_name == 'push' }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v3.13.0
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
@@ -179,16 +171,16 @@ jobs:
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v3.13.0
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
@@ -208,16 +200,16 @@ jobs:
if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v3.13.0
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
@@ -239,7 +231,7 @@ jobs:
if: ${{ (github.event_name == 'release') && (github.event.action == 'published') }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: notify the main repo about the new release of docs package
91 changes: 42 additions & 49 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
import zio.sbt.githubactions.Job
import zio.sbt.githubactions.Step.SingleStep

enablePlugins(ZioSbtEcosystemPlugin, ZioSbtCiPlugin)

inThisBuild(
List(
name := "ZIO Redis",
zioVersion := "2.0.16",
scala212 := "2.12.18",
scala213 := "2.13.11",
scala3 := "3.3.1",
ciEnabledBranches := List("master"),
ciExtraTestSteps := List(
SingleStep(
name = "Run Redis",
run = Some("docker-compose -f docker/redis-compose.yml up -d")
),
SingleStep(
name = "Run Redis cluster",
run = Some("docker-compose -f docker/redis-cluster-compose.yml up -d")
),
SingleStep(
name = "Run integration tests",
run = Some("sbt ++${{ matrix.scala }} IntegrationTest/test")
)
),
developers := List(
Developer("jdegoes", "John De Goes", "john@degoes.net", url("https://degoes.net")),
Developer("mijicd", "Dejan Mijic", "dmijic@acm.org", url("https://github.com/mijicd"))
@@ -40,48 +23,27 @@ lazy val root =
crossScalaVersions := Nil,
publish / skip := true
)
.aggregate(redis, embedded, benchmarks, example, docs)

lazy val redis =
project
.in(file("modules/redis"))
.settings(addOptionsOn("2.13")("-Xlint:-infer-any"))
.settings(stdSettings(name = Some("zio-redis"), packageName = Some("zio.redis")))
.settings(enableZIO(enableStreaming = true))
.settings(libraryDependencies ++= Dependencies.redis(zioVersion.value))
.settings(Defaults.itSettings)
.configs(IntegrationTest)

lazy val embedded =
project
.in(file("modules/embedded"))
.settings(stdSettings(name = Some("zio-redis-embedded"), packageName = Some("zio.redis.embedded")))
.settings(enableZIO())
.settings(libraryDependencies ++= Dependencies.Embedded)
.dependsOn(redis)
.aggregate(benchmarks, client, docs, embedded, example, integrationTest)

lazy val benchmarks =
project
.in(file("modules/benchmarks"))
.enablePlugins(JmhPlugin)
.dependsOn(redis)
.dependsOn(client)
.settings(stdSettings(name = Some("benchmarks"), packageName = Some("zio.redis.benchmarks")))
.settings(
crossScalaVersions -= scala3.value,
libraryDependencies ++= Dependencies.Benchmarks,
publish / skip := true
)

lazy val example =
lazy val client =
project
.in(file("modules/example"))
.dependsOn(redis)
.settings(stdSettings(name = Some("example"), packageName = Some("zio.redis.example")))
.in(file("modules/redis"))
.settings(addOptionsOn("2.13")("-Xlint:-infer-any"))
.settings(stdSettings(name = Some("zio-redis"), packageName = Some("zio.redis")))
.settings(enableZIO(enableStreaming = true))
.settings(
publish / skip := true,
libraryDependencies ++= Dependencies.Example
)
.settings(libraryDependencies ++= Dependencies.redis(zioVersion.value))

lazy val docs = project
.in(file("zio-redis-docs"))
@@ -93,9 +55,40 @@ lazy val docs = project
.settings(
moduleName := "zio-redis-docs",
projectName := (ThisBuild / name).value,
mainModuleName := (redis / moduleName).value,
mainModuleName := (client / moduleName).value,
projectStage := ProjectStage.Development,
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(redis)
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(client)
)
.dependsOn(redis, embedded)
.dependsOn(client, embedded)
.enablePlugins(WebsitePlugin)

lazy val embedded =
project
.in(file("modules/embedded"))
.settings(stdSettings(name = Some("zio-redis-embedded"), packageName = Some("zio.redis.embedded")))
.settings(enableZIO())
.settings(libraryDependencies ++= Dependencies.Embedded)
.dependsOn(client)

lazy val example =
project
.in(file("modules/example"))
.dependsOn(client)
.settings(stdSettings(name = Some("example"), packageName = Some("zio.redis.example")))
.settings(enableZIO(enableStreaming = true))
.settings(
publish / skip := true,
libraryDependencies ++= Dependencies.Example
)

lazy val integrationTest =
project
.in(file("modules/redis-it"))
.settings(stdSettings(name = Some("zio-redis-it")))
.settings(enableZIO(enableStreaming = true))
.settings(
libraryDependencies ++= Dependencies.redis(zioVersion.value),
publish / skip := true,
Test / fork := false
)
.dependsOn(client)
17 changes: 0 additions & 17 deletions docker/redis-cluster-compose.yml

This file was deleted.

22 changes: 0 additions & 22 deletions docker/redis-cluster.sh

This file was deleted.

14 changes: 0 additions & 14 deletions docker/redis-compose.yml

This file was deleted.

Loading