From c1211a5ba7091861ba5629d74a6238a2f50e8a5f Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 23 Apr 2021 09:15:31 +0200 Subject: [PATCH 1/3] added and tested assembly --- build.sbt | 2 +- project/Dependencies.scala | 2 +- project/plugins.sbt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 project/plugins.sbt diff --git a/build.sbt b/build.sbt index 151ecd8..3c35c44 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ import Dependencies._ -ThisBuild / scalaVersion := "2.12.8" +ThisBuild / scalaVersion := "2.13.5" ThisBuild / version := "0.1.0-SNAPSHOT" ThisBuild / organization := "org.exercism" ThisBuild / organizationName := "exercism" diff --git a/project/Dependencies.scala b/project/Dependencies.scala index c11e0a2..858a1fe 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -1,5 +1,5 @@ import sbt._ object Dependencies { - lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.1" + lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.8" } diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 0000000..72477a2 --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1 @@ +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0") From bbd223a598739ab3f59e430cc11a98c6eb18babd Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 23 Apr 2021 09:35:02 +0200 Subject: [PATCH 2/3] updated run.sh --- bin/run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/run.sh b/bin/run.sh index ae0e6a3..b7bcdd4 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -54,6 +54,8 @@ mv -f "${original_tests_file}" "${tests_file}" popd > /dev/null # Write the results.json file -sbt "set offline := true" "run ${build_log_file} ${tests_results_file} ${results_file}" > "${runner_log_file}" +# sbt "set offline := true" + +java -jar "target/scala-2.13/TestRunner-assembly-0.1.0-SNAPSHOT.jar ${build_log_file} ${tests_results_file} ${results_file}" > "${runner_log_file}" echo "${slug}: done" From 44b544f07e3b402b45e03bf44d1cc8574f59aa03 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Wed, 28 Apr 2021 10:04:41 +0200 Subject: [PATCH 3/3] Use pre-compiled test runner assembly --- Dockerfile | 2 +- bin/run.sh | 4 +--- build.sbt | 2 +- project/Dependencies.scala | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index b0a3a53..64cf2e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /opt/test-runner COPY project/ project/ COPY src/ src/ COPY build.sbt build.sbt -RUN sbt compile +RUN sbt assembly COPY . . diff --git a/bin/run.sh b/bin/run.sh index b7bcdd4..25ffc8d 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -54,8 +54,6 @@ mv -f "${original_tests_file}" "${tests_file}" popd > /dev/null # Write the results.json file -# sbt "set offline := true" - -java -jar "target/scala-2.13/TestRunner-assembly-0.1.0-SNAPSHOT.jar ${build_log_file} ${tests_results_file} ${results_file}" > "${runner_log_file}" +java -jar target/scala-2.12/TestRunner-assembly-0.1.0-SNAPSHOT.jar "${build_log_file}" "${tests_results_file}" "${results_file}" > "${runner_log_file}" echo "${slug}: done" diff --git a/build.sbt b/build.sbt index 3c35c44..151ecd8 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ import Dependencies._ -ThisBuild / scalaVersion := "2.13.5" +ThisBuild / scalaVersion := "2.12.8" ThisBuild / version := "0.1.0-SNAPSHOT" ThisBuild / organization := "org.exercism" ThisBuild / organizationName := "exercism" diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 858a1fe..c11e0a2 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -1,5 +1,5 @@ import sbt._ object Dependencies { - lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.8" + lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.1" }