From 57a7761330473a320447641c06cb422ee52ec6bd Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 29 Nov 2018 17:25:13 +0100 Subject: [PATCH] Set up Gitlab CI --- .gitlab-ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..b8529a2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,44 @@ +# Note: We use --silent argument on yarn invocations to keep the output simple +# and readable through email notifications. +image: node:8 + +cache: + key: 'node-modules-cyclassist' + paths: + - node_modules/ + - yarn.lock + +stages: + - lint # Check code syntax and coding style + - build # Try to build Kresus code + - test # Run unit tests + +# Lint and check last commit in a dedicated task +lint: + stage: lint + before_script: + - yarn install + script: + # Lint JS code + - yarn run --silent lint + +# Build the server and client code in dev and production +build: + stage: build + before_script: + - yarn install + script: + # Check everything builds correctly + - yarn run --silent build + cache: + policy: pull + +# Run tests +test: + stage: test + before_script: + - yarn install + script: + - yarn run --silent test + cache: + policy: pull