From 6310e4709134bcd8e049372244b7913f3dd1bc68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Wed, 18 Sep 2019 14:08:46 +0200 Subject: [PATCH] Add gitlab CI configuration --- .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..d1e47a1 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,36 @@ +# This configuration is not used for the final grading, you can change it if +# you know what you're doing. + +stages: + - build + - grade + +compile: + stage: build + image: lampepfl/moocs-dotty:2019-09-17-2 + tags: + - cs210 + script: + - sbt packageSubmission + artifacts: + expire_in: 1 day + paths: + - submission.jar + +grade: + stage: grade + tags: + - cs210 + image: + name: registry.gitlab.com/fnux/cs210-grading-images/progfun1-example + entrypoint: [""] + allow_failure: true + before_script: + - mkdir -p /shared/submission/ + - cp submission.jar /shared/submission/submission.jar + script: + - cd /grader + - /grader/grade > result.json + - cat result.json | /grader/feedback-printer + # 'Fail' if the student did not get the full grade. + - cat result.json | grep "10.00 out of 10.00 in our tests" > /dev/null