From ec4e54e99159df458dc0de0e30d0261084e8d76f Mon Sep 17 00:00:00 2001 From: lukas Date: Sat, 20 Jun 2020 10:02:03 +0200 Subject: [PATCH] improved gitlab ci job --- .gitlab-ci.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dbd6421..05928f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,18 +1,31 @@ image: node:latest stages: - - test - - coverage + - prepare - build + - test cache: paths: - node_modules/ +prepare: + stage: prepare + script: + - npm install --progress=false + +build: + stage: build + script: + - npm run build + artifacts: + expire_in: 7 days + paths: + - build/ + test: stage: test script: - - npm install - CI=true npm run test artifacts: reports: @@ -20,15 +33,10 @@ test: - ./junit.xml coverage: - stage: coverage + stage: test script: - CI=true npm run coverage artifacts: reports: cobertura: - ./coverage/cobertura-coverage.xml - -build: - stage: build - script: - - npm run build