diff --git a/modules/integration/src/test/scala/scala/cli/integration/BspTestDefinitions.scala b/modules/integration/src/test/scala/scala/cli/integration/BspTestDefinitions.scala index d3eb4e72c1..e9dd6975bb 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/BspTestDefinitions.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/BspTestDefinitions.scala @@ -2191,28 +2191,27 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg } } - // TODO: test for the most recent CLI version as well when 1.5.1 is out - for { cliVersion <- Seq("1.5.0-34-g31a88e428-SNAPSHOT") } + for { cliVersion <- Seq("1.5.0-34-g31a88e428-SNAPSHOT", "1.6.0") } test( s"setup-ide prepares a valid BSP configuration with --cli-version $cliVersion" ) { - val scriptName = "cli-version.sc" - val inputs = TestInputs( - os.rel / scriptName -> s"""println("Hello from launcher v$cliVersion")""" - ) - inputs.fromRoot { root => - val cliVersionArgs = List("--cli-version", cliVersion) - os.proc(TestUtil.cli, cliVersionArgs, "setup-ide", scriptName, extraOptions).call(cwd = - root - ) - val expectedIdeLauncherFile = - root / Constants.workspaceDirName / "ide-launcher-options.json" - expect(expectedIdeLauncherFile.toNIO.toFile.exists()) - expect(os.read(expectedIdeLauncherFile).contains(cliVersion)) - val bspConfig = readBspConfig(root) - expect(bspConfig.argv.head == TestUtil.cliPath) - expect(bspConfig.argv.containsSlice(cliVersionArgs)) - expect(bspConfig.argv.indexOfSlice(cliVersionArgs) < bspConfig.argv.indexOf("bsp")) + TestUtil.retryOnCi() { + val scriptName = "cli-version.sc" + TestInputs(os.rel / scriptName -> s"""println("Hello from launcher v$cliVersion")""") + .fromRoot { root => + val cliVersionArgs = List("--cli-version", cliVersion) + os.proc(TestUtil.cli, cliVersionArgs, "setup-ide", scriptName, extraOptions).call(cwd = + root + ) + val expectedIdeLauncherFile = + root / Constants.workspaceDirName / "ide-launcher-options.json" + expect(expectedIdeLauncherFile.toNIO.toFile.exists()) + expect(os.read(expectedIdeLauncherFile).contains(cliVersion)) + val bspConfig = readBspConfig(root) + expect(bspConfig.argv.head == TestUtil.cliPath) + expect(bspConfig.argv.containsSlice(cliVersionArgs)) + expect(bspConfig.argv.indexOfSlice(cliVersionArgs) < bspConfig.argv.indexOf("bsp")) + } } } diff --git a/scala-cli.bat b/scala-cli.bat index 0251e386db..f3e05b60d6 100644 --- a/scala-cli.bat +++ b/scala-cli.bat @@ -7,7 +7,7 @@ rem Download the latest version of this script at https://github.com/VirtusLab/s setlocal enabledelayedexpansion -set "SCALA_CLI_VERSION=1.5.4" +set "SCALA_CLI_VERSION=1.6.0" set SCALA_CLI_URL=https://github.com/VirtusLab/scala-cli/releases/download/v%SCALA_CLI_VERSION%/scala-cli.bat set CACHE_BASE=%localappdata%/Coursier/v1 diff --git a/scala-cli.sh b/scala-cli.sh index 3d6dd2e8eb..d0b40b1f10 100755 --- a/scala-cli.sh +++ b/scala-cli.sh @@ -7,7 +7,7 @@ set -eu -SCALA_CLI_VERSION="1.5.4" +SCALA_CLI_VERSION="1.6.0" GH_ORG="VirtusLab" GH_NAME="scala-cli"