From 099cc54a98091a029d9048c5e59af490f5388d41 Mon Sep 17 00:00:00 2001 From: rasul Date: Sun, 2 Feb 2020 15:39:05 -0600 Subject: [PATCH] gitlab-ci --- .gitlab-ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..401fb59 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,34 @@ +image: rascul3/rust:latest + +build: + stage: build + script: + - cargo build + +test: + stage: test + script: + - cargo test + +cov: + stage: test + coverage: '/^Coverage+:\s(\d+(?:\.\d+)?)/' + script: + - cargo build + - cargo kcov + - COVERAGE=$(grep -Po 'covered":.*?[^\\]"' target/cov/index.json | grep "[0-9]*\.[0-9]" -o) + - echo "Coverage:" $COVERAGE + - mv target/cov public/ + artifacts: + paths: + - public + +pages: + stage: deploy + script: + - mv index.html public/ + artifacts: + paths: + - public + only: + - master