Skip to content
This repository was archived by the owner on Oct 10, 2023. It is now read-only.

Commit 09d2727

Browse files
saeltzJannikArndt
andauthored
Add versionScheme & MiMa (#157)
* Add versionScheme * Add mima Signed-off-by: Bendix Saeltz <bendix@saeltz.de> Co-authored-by: Jannik Arndt <jannik@jannikarndt.de>
1 parent d74a66b commit 09d2727

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

.github/workflows/buildAndTest.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,18 @@ jobs:
7777
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}-${{ hashFiles('**/plugins.sbt') }}-${{ hashFiles('**/build.properties') }}
7878
- name: Run scapegoat
7979
run: sbt scapegoat
80+
81+
mima:
82+
name: Report Binary Issues
83+
runs-on: ubuntu-latest
84+
steps:
85+
- uses: actions/checkout@v2
86+
- name: Cache SBT & ivy cache
87+
uses: actions/cache@v2
88+
with:
89+
path: |
90+
~/.ivy2/cache
91+
~/.sbt
92+
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}-${{ hashFiles('**/plugins.sbt') }}-${{ hashFiles('**/build.properties') }}
93+
- name: Run mima
94+
run: sbt mimaReportBinaryIssues

build.sbt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ lazy val root = (project in file("."))
77
homepage := Some(url("https://github.com/moia-oss/scala-http-client")),
88
scalaVersion := "2.13.4",
99
crossScalaVersions := List("2.13.4", "2.12.13"),
10+
versionScheme := Some("early-semver"),
1011
scalacOptions ++= {
1112
CrossVersion.partialVersion(scalaVersion.value) match {
1213
case Some((2, 12)) => scalacOptions_2_12
@@ -28,6 +29,7 @@ lazy val root = (project in file("."))
2829
GitVersioning,
2930
GitBranchPrompt
3031
)
32+
.settings(mimaSettings)
3133

3234
val akkaVersion = "2.6.12"
3335
val akkaHttpVersion = "10.2.3"
@@ -117,3 +119,7 @@ lazy val sbtGitSettings = Seq(
117119
case _ => None
118120
}
119121
)
122+
123+
lazy val mimaSettings = Seq(
124+
mimaPreviousArtifacts := Set("io.moia" %% "scala-http-client" % "4.0.0")
125+
)

project/plugins.sbt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5")
1414
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
1515

1616
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
17+
18+
// sbt> mimaReportBinaryIssues
19+
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1")

0 commit comments

Comments
 (0)