From 7ae8780d632b56a598716ac9ca7614c3ed7b99c5 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 23 Dec 2020 20:15:28 +0100 Subject: [PATCH] update gitlab-ci --- .gitlab-ci.yml | 51 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d948f13..e3917140 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,24 +1,47 @@ image: node:latest stages: - - test + - Preparation + - Build + - Test -lint: - stage: test - before_script: - - npm install +Install Dependencies: + stage: Preparation + cache: + key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR + paths: + - node_modules/ script: - - npm run lint + - npm ci + only: + changes: + - package-lock.json -compile: - stage: test - before_script: - - npm install +Build: + stage: Build + cache: + key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR + paths: + - node_modules/ + policy: pull script: - npm run build -# test: -# stage: test -# before_script: -# - npm install + +Lint: + stage: Test + cache: + key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR + paths: + - node_modules/ + policy: pull + script: + - npm run lint +# Test: +# stage: Test +# cache: +# key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR +# paths: +# - node_modules/ +# policy: pull # script: # - npm test