Skip to content

Commit

Permalink
Fix ci, run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvanoosten committed Feb 9, 2025
1 parent a660394 commit db4b367
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 26 deletions.
37 changes: 23 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,38 @@
name: CI
env:
JDK_JAVA_OPTIONS: -XX:+PrintCommandLineFlags
JVM_OPTS: -XX:+PrintCommandLineFlags
'on':
workflow_dispatch: {}
release:
types:
- published
push: {}
pull_request: {}
create: {}
pull_request:
branches-ignore:
- gh-pages
concurrency:
group: ${{ github.workflow }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.run_id || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Git Checkout
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4
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.10.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Check all code compiles
Expand All @@ -43,17 +48,19 @@ jobs:
continue-on-error: false
steps:
- name: Git Checkout
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4
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.10.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Check if the site workflow is up to date
Expand All @@ -78,15 +85,17 @@ jobs:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.10.0
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: corretto
java-version: ${{ matrix.java }}
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Git Checkout
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Test
Expand Down
7 changes: 3 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ inThisBuild(
ciPostReleaseJobs := Seq.empty,
ciCheckWebsiteBuildProcess := Seq.empty,
scalaVersion := scala213.value,
ciTargetScalaVersions := makeTargetScalaMap(
ciTargetScalaVersions := targetScalaVersionsFor(
`zio-quickstart-encode-decode-json`,
`zio-quickstart-sql`,
`zio-quickstart-prelude`,
`zio-quickstart-restful-webservice`
).value,
ciDefaultTargetJavaVersions := Seq("17"),
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
ciTargetJavaVersions := Seq("17"),
semanticdbEnabled := true
)
)

Expand Down
12 changes: 6 additions & 6 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
val zioSbtVersion = "0.4.0-alpha.6+15-525bdf8e-SNAPSHOT"
val zioSbtVersion = "0.4.0-alpha.30"

//addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % zioSbtVersion)
addSbtPlugin("dev.zio" % "zio-sbt-website" % zioSbtVersion)
addSbtPlugin("dev.zio" % "zio-sbt-ci" % zioSbtVersion)
addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % zioSbtVersion)
addSbtPlugin("dev.zio" % "zio-sbt-website" % zioSbtVersion)
addSbtPlugin("dev.zio" % "zio-sbt-ci" % zioSbtVersion)

addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.11.1")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.0")

resolvers ++= Resolver.sonatypeOssRepos("public")
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ object JsonStreamingKafkaApp extends ZIOAppDefault {
ZIO.scoped {
for {
consumer <- Consumer.make(
ConsumerSettings(BOOSTRAP_SERVERS).withGroupId("streaming-kafka-app")
ConsumerSettings(BOOSTRAP_SERVERS).withGroupId(
"streaming-kafka-app"
)
)
_ <- consumer
.plainStream(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object SimpleKafkaApp extends ZIOAppDefault {
keyDeserializer = Serde.long,
valueDeserializer = Serde.string
) { record =>
Console.printLine(s"Consumed ${record.key()}, ${record.value()}").orDie
Console
.printLine(s"Consumed ${record.key()}, ${record.value()}")
.orDie
}
.fork

Expand Down

0 comments on commit db4b367

Please sign in to comment.