Skip to content

Commit 54477bb

Browse files
committed
chore: 🤖 Use sbt-version-policy to check binary compatibilty
1 parent a6ae24b commit 54477bb

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

‎.github/workflows/build.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
~/.cache/coursier
3030
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
3131

32-
- name: Set up JDK 1.8
32+
- name: Set up JDK
3333
uses: actions/setup-java@v1
3434
with:
3535
java-version: ${{ matrix.java }}
@@ -39,3 +39,33 @@ jobs:
3939

4040
- name: Run tests
4141
run: sbt +compile +test
42+
43+
versionpolicycheck:
44+
name: Version policy check
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
os: [ ubuntu-latest ]
49+
java:
50+
- 11
51+
runs-on: ${{ matrix.os }}
52+
steps:
53+
54+
- uses: actions/checkout@v2
55+
56+
- name: Cache sbt
57+
uses: actions/cache@v2
58+
with:
59+
path: |
60+
~/.sbt
61+
~/.ivy2/cache
62+
~/.cache/coursier
63+
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
64+
65+
- name: Set up JDK
66+
uses: actions/setup-java@v1
67+
with:
68+
java-version: ${{ matrix.java }}
69+
70+
- name: Version check
71+
run: sbt "project cucumberScala" versionPolicyCheck

‎build.sbt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ lazy val examples = (projectMatrix in file("examples"))
118118
.dependsOn(cucumberScala % Test)
119119
.jvmPlatform(scalaVersions = Seq(scala213, scala212))
120120

121+
// Version policy check
122+
123+
ThisBuild / versionPolicyIntention := Compatibility.BinaryAndSourceCompatible
124+
121125
// Release & Publish
122126

123127
Global / publishMavenStyle := true

‎project/plugins.sbt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.7.0")
44
// Scalafmt (formatter)
55
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
66

7+
// Version policy check
8+
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.0-RC5")
9+
710
// Release
811
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
912

0 commit comments

Comments
 (0)