From 80736886bd85add9bbd0a7a01695f963c0cc3143 Mon Sep 17 00:00:00 2001 From: Matt Bovel <matthieu@bovel.net> Date: Tue, 28 Mar 2023 13:27:58 +0200 Subject: [PATCH] Setup CI --- .gitlab-ci.yml | 24 ++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..edab9e0 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,24 @@ +image: "sbtscala/scala-sbt:graalvm-ce-22.3.0-b2-java17_1.8.2_3.2.2" + +variables: + SBT_VERSION: "1.7.1" + SBT_OPTS: "-Dsbt.global.base=sbt-cache/.sbtboot -Dsbt.boot.directory=sbt-cache/.boot -Dsbt.ivy.home=sbt-cache/.ivy" + +cache: + key: "$CI_BUILD_REF_NAME" # contains either the branch or the tag, so it's caching per branch + untracked: true + paths: + - "sbt-cache/.ivy.cache" + - "sbt-cache/.boot" + - "sbt-cache/.sbtboot" + - "sbt-cache/target" + +stages: + - test + +test: + timeout: 10m + tags: + - cs320 + script: + - sbt "runMain lecture1.javaThreads" diff --git a/README.md b/README.md index 47fae79..6e6f14c 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ You can try [`01-sumList.worksheet.sc`](src/main/scala/ex01/01-sumList.worksheet Try to change the code and you should see the results automatically updating! -###Â Format code +### Format code This project uses [scalafmt](https://scalameta.org/scalafmt/) to format code. -- GitLab