diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66d648a4..a5eae8e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: ~/.cache/coursier key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Set up JDK 1.8 + - name: Set up JDK uses: actions/setup-java@v1 with: java-version: ${{ matrix.java }} @@ -39,3 +39,33 @@ jobs: - name: Run tests run: sbt +compile +test + + versionpolicycheck: + name: Version policy check + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest ] + java: + - 11 + runs-on: ${{ matrix.os }} + steps: + + - uses: actions/checkout@v2 + + - name: Cache sbt + uses: actions/cache@v2 + with: + path: | + ~/.sbt + ~/.ivy2/cache + ~/.cache/coursier + key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + + - name: Version check + run: sbt "project cucumberScala" versionPolicyCheck \ No newline at end of file diff --git a/build.sbt b/build.sbt index 95c5c1e1..b49486e9 100644 --- a/build.sbt +++ b/build.sbt @@ -118,6 +118,11 @@ lazy val examples = (projectMatrix in file("examples")) .dependsOn(cucumberScala % Test) .jvmPlatform(scalaVersions = Seq(scala213, scala212)) +// Version policy check + +ThisBuild / versionScheme := Some("early-semver") +ThisBuild / versionPolicyIntention := Compatibility.BinaryAndSourceCompatible + // Release & Publish Global / publishMavenStyle := true diff --git a/project/build.properties b/project/build.properties index c06db1bb..0b2e09c5 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.5 +sbt.version=1.4.7 diff --git a/project/plugins.sbt b/project/plugins.sbt index e826a62d..355d74c6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,6 +4,9 @@ addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.7.0") // Scalafmt (formatter) addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") +// Version policy check +addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.0-RC5") + // Release addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")