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

Setup MiMa checks #166

Merged
merged 3 commits into from
Oct 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
47 changes: 47 additions & 0 deletions .github/workflows/binary-compatibility-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Binary Compatibility

on:
pull_request:
push:
branches:
- main

permissions: {}

jobs:
check-binary-compatibility:
name: Check / Binary Compatibility
runs-on: ubuntu-22.04
if: github.repository == 'apache/pekko-persistence-r2dbc'
steps:
pjfanning marked this conversation as resolved.
Show resolved Hide resolved
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: 0

- name: Setup Java 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11

- name: Install sbt
uses: sbt/setup-sbt@v1

- name: Cache Coursier cache
uses: coursier/cache-action@v6

- name: Enable jvm-opts
run: cp .jvmopts-ci .jvmopts

- name: Compile code
run: sbt +compile

- name: Report MiMa Binary Issues
run: |-
sbt +mimaReportBinaryIssues

- name: Check correct MiMa filter directories
run: |
sbt checkMimaFilterDirectories
12 changes: 11 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ inThisBuild(
lazy val dontPublish = Seq(publish / skip := true, Compile / publishArtifact := false)

lazy val root = (project in file("."))
.disablePlugins(MimaPlugin)
.settings(dontPublish)
.settings(
name := "pekko-persistence-r2dbc-root")
Expand Down Expand Up @@ -69,12 +70,21 @@ lazy val migration = (project in file("migration"))
dependencyOverrides ++= Dependencies.pekkoTestDependencyOverrides,
Test / mainClass := Some("org.apache.pekko.persistence.r2dbc.migration.MigrationTool"),
Test / run / fork := true,
Test / run / javaOptions += "-Dlogback.configurationFile=logback-main.xml")
Test / run / javaOptions += "-Dlogback.configurationFile=logback-main.xml",
mimaPreviousArtifacts := {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Set.empty
case _ =>
mimaPreviousArtifacts.value
}
})
.dependsOn(core % "compile->compile;test->test")

lazy val docs = project
.in(file("docs"))
.enablePlugins(PekkoParadoxPlugin, ParadoxSitePlugin, ScalaUnidocPlugin)
.disablePlugins(MimaPlugin)
.dependsOn(core, projection, migration)
.settings(dontPublish)
.settings(
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") // for maintenance o
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.8.0")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4")

// for releasing
addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.0")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Caused by https://github.com/apache/pekko-persistence-r2dbc/pull/101
ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.projection.r2dbc.javadsl.R2dbcSession.updateOne")
ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.projection.r2dbc.javadsl.R2dbcSession.update")