Skip to content
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
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v14
- name: Install Java
uses: actions/setup-java@v4
with:
java-version: corretto@1.17
distribution: corretto
java-version: 17
- name: Install Sbt
uses: sbt/setup-sbt@v1
- name: Cache SBT
uses: actions/cache@v4
with:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v14
- name: Install Java
uses: actions/setup-java@v4
with:
java-version: corretto@1.17
distribution: corretto
java-version: 17
- name: Install Sbt
uses: sbt/setup-sbt@v1
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ target/
# intellij
.idea/
*.iml
*.private.env.json

# metals / bsp
.metals/
Expand Down
3 changes: 1 addition & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# ThisBuild / laserdiscScalaFmtGenOn := false
# -----------------------------------------------------------------------

version=3.9.10
version=3.11.1

maxColumn = 140
style = default
Expand All @@ -29,7 +29,6 @@ rewrite.rules = [
AvoidInfix
RedundantBraces
RedundantParens
AsciiSortImports
PreferCurlyFors
SortModifiers
Imports
Expand Down
9 changes: 4 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import laserdisc.sbt.CompileTarget.Scala2And3
import laserdisc.sbt.CompileTarget.Scala2And3LTS
import laserdisc.sbt.LaserDiscDevelopers._

name := "mysql-binlog-stream"

ThisBuild / laserdiscRepoName := "mysql-binlog-stream"
ThisBuild / laserdiscCompileTarget := Scala2And3
ThisBuild / laserdiscCompileTarget := Scala2And3LTS

lazy val commonSettings = Seq(
Test / parallelExecution := false,
Expand All @@ -21,7 +19,7 @@ lazy val noPublishSettings = Seq(
lazy val dockerPublishSettings = Seq(
Docker / maintainer := "Dmytro Semenov <sdo.semenov@gmail.com>",
Docker / dockerExposedPorts := Seq(),
dockerBaseImage := "openjdk:11",
dockerBaseImage := "openjdk:17",
dockerUpdateLatest := true,
Universal / javaOptions ++= Seq(
"-J-XX:InitialRAMPercentage=70",
Expand All @@ -31,6 +29,7 @@ lazy val dockerPublishSettings = Seq(

lazy val root = project
.in(file("."))
.settings(name := "mysql-binlog-stream")
.settings(commonSettings)
.settings(noPublishSettings)
.aggregate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import eu.timepit.refined.auto._
import eu.timepit.refined.types.string.TrimmedString
import io.laserdisc.mysql.binlog.config.BinLogConfig
import io.laserdisc.mysql.binlog.models.SchemaMetadata
import io.laserdisc.mysql.binlog.stream.{MysqlBinlogStream, TransactionState, streamEvents}
import io.laserdisc.mysql.binlog.stream.{streamEvents, MysqlBinlogStream, TransactionState}
import io.laserdisc.mysql.binlog.{client, database}
import org.typelevel.log4cats.slf4j.Slf4jLogger

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.testcontainers.containers.Network
import org.testcontainers.utility.DockerImageName

import java.net.URI
import java.util.Properties
import scala.concurrent.ExecutionContext
import scala.concurrent.ExecutionContext.Implicits
import scala.jdk.CollectionConverters._
Expand All @@ -17,20 +18,17 @@ trait MySqlContainerTest extends TestContainersForAll with BeforeAndAfterEach {

override type Containers = MySQLContainer

def startContainers() = {
def startContainers(): MySQLContainer = {
container.start()
container
}

def container = mySQLContainer
def container: MySQLContainer = mySQLContainer

protected val sharedNetwork: Network = Network.newNetwork()

protected lazy val mySQLContainer: MySQLContainer = new MySQLContainer(
mysqlImageVersion = Some(System.getProperty("os.arch") match {
case "aarch64" => DockerImageName.parse("biarms/mysql:5.7").asCompatibleSubstituteFor("mysql")
case _ => DockerImageName.parse("mysql:5.7")
})
mysqlImageVersion = Some(DockerImageName.parse("mysql:8.4"))
Comment thread
barryoneill marked this conversation as resolved.
) {
this.container.withNetwork(sharedNetwork)
this.container.withNetworkAliases("mysql")
Expand All @@ -42,7 +40,7 @@ trait MySqlContainerTest extends TestContainersForAll with BeforeAndAfterEach {
this.container.withInitScript("init.sql")

}
protected lazy val mysqlDBCreds = {
protected lazy val mysqlDBCreds: Properties = {
val props = new java.util.Properties()
props.put("user", container.username)
props.put("password", container.password)
Expand Down
36 changes: 18 additions & 18 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@ import sbt.*
import sbt.Keys.libraryDependencies

object Dependencies {
val cirisVersion = "3.11.0"
val doobieVersion = "1.0.0-RC10"
val circeVersion = "0.14.15"
val cirisVersion = "3.15.0"
val doobieVersion = "1.0.0-RC12"
val circeVersion = "0.14.16"

val TestLib = libraryDependencies ++= Seq(
"org.scalamock" %% "scalamock" % "7.5.0" % Test,
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
"com.dimafeng" %% "testcontainers-scala" % "0.43.0" % Test,
"org.testcontainers" % "mysql" % "1.21.3" % Test,
"org.testcontainers" % "testcontainers" % "1.21.3" % Test
"org.scalamock" %% "scalamock" % "7.5.5" % Test,
"org.scalatest" %% "scalatest" % "3.2.20" % Test,
"com.dimafeng" %% "testcontainers-scala" % "0.44.1" % Test,
"org.testcontainers" % "testcontainers-mysql" % "2.0.5" % Test,
"org.testcontainers" % "testcontainers" % "2.0.5" % Test
)

val Config = libraryDependencies ++= Seq(
"is.cir" %% "ciris-enumeratum" % cirisVersion,
"is.cir" %% "ciris-refined" % cirisVersion,
"eu.timepit" %% "refined" % "0.11.3"
"eu.timepit" %% "refined" % "0.11.4"
)

val Logging = libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.5.19",
"ch.qos.logback" % "logback-core" % "1.5.19",
"org.slf4j" % "jcl-over-slf4j" % "2.0.17",
"org.slf4j" % "jul-to-slf4j" % "2.0.17",
"org.typelevel" %% "log4cats-slf4j" % "2.7.1"
"ch.qos.logback" % "logback-classic" % "1.5.37",
"ch.qos.logback" % "logback-core" % "1.5.37",
"org.slf4j" % "jcl-over-slf4j" % "2.0.18",
"org.slf4j" % "jul-to-slf4j" % "2.0.18",
"org.typelevel" %% "log4cats-slf4j" % "2.8.0"
)

val Persistence = libraryDependencies ++= Seq(
"org.tpolecat" %% "doobie-core" % doobieVersion,
"org.tpolecat" %% "doobie-hikari" % doobieVersion,
"org.tpolecat" %% "doobie-refined" % doobieVersion,
"org.tpolecat" %% "doobie-scalatest" % doobieVersion % Test,
"com.mysql" % "mysql-connector-j" % "9.4.0",
"com.zendesk" % "mysql-binlog-connector-java" % "0.30.1"
"com.mysql" % "mysql-connector-j" % "9.7.0",
"com.zendesk" % "mysql-binlog-connector-java" % "0.30.3"
)

val Circe = libraryDependencies ++= Seq(
Expand All @@ -45,8 +45,8 @@ object Dependencies {

val XML = libraryDependencies ++= Seq(
"javax.xml.bind" % "jaxb-api" % "2.3.1",
"com.sun.xml.bind" % "jaxb-impl" % "4.0.6",
"com.sun.xml.bind" % "jaxb-core" % "4.0.6",
"com.sun.xml.bind" % "jaxb-impl" % "4.0.9",
"com.sun.xml.bind" % "jaxb-core" % "4.0.9",
"javax.activation" % "activation" % "1.1.1"
)

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# ThisBuild / laserdiscSBTVersionGenOn := false
# -----------------------------------------------------------------------

sbt.version = 1.11.7
sbt.version = 2.0.1
5 changes: 2 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.2")
addSbtPlugin("io.laserdisc" % "sbt-laserdisc-defaults" % "0.6.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.4")
addSbtPlugin("io.laserdisc" % "sbt-laserdisc-defaults" % "1.1.1")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.2")
Loading