Skip to content

Commit 6e2a1e4

Browse files
authored
Merge pull request #180 from cucumber/version-policy
Version policy
2 parents a6ae24b + c5d30f1 commit 6e2a1e4

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ 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 / versionScheme := Some("early-semver")
124+
ThisBuild / versionPolicyIntention := Compatibility.BinaryAndSourceCompatible
125+
121126
// Release & Publish
122127

123128
Global / publishMavenStyle := true

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.4.5
1+
sbt.version=1.4.7

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)