sbt-release icon indicating copy to clipboard operation
sbt-release copied to clipboard

skip-tests not working with `+test`

Open jbwheatley opened this issue 4 years ago • 1 comments

I have the following release process for my project that cross-compiles in 2.12.10 and 2.13.1

releaseProcess := Seq[ReleaseStep](
        checkSnapshotDependencies,
        inquireVersions,
        runClean,
        releaseStepCommandAndRemaining("+test"),
        setReleaseVersion,
        commitReleaseVersion,
        tagRelease,
        releaseStepCommandAndRemaining("+publish"),
        setNextVersion,
        commitNextVersion,
        pushChanges
      )

I would like to be able to run sbt release skip-tests, but the tests are still running.

jbwheatley avatar Dec 10 '19 15:12 jbwheatley

the solution I'm using is using this instead:

lazy val crossRunTest: ReleaseStep = ReleaseStep(
  action = { st: State =>
    if (!st.get(skipTests).getOrElse(false)) {
      releaseStepCommandAndRemaining("+test")(st)
    } else st
  },
  enableCrossBuild = true
)

I will make a PR to add

jbwheatley avatar Dec 10 '19 15:12 jbwheatley