From 1df39c76f46947432e8fa2ddcf6de57a6bc2b0b1 Mon Sep 17 00:00:00 2001 From: Kevin R Date: Thu, 10 Sep 2020 00:44:16 +0200 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3acea2b..59605b9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,11 @@ before_script: - apt-get update -y - apt-get install -y zip unzip nodejs jsonlint +# This folder is cached between builds +# http://docs.gitlab.com/ce/ci/yaml/README.html#cache +cache: + paths: + - node_modules/ stages: - install - test @@ -37,27 +42,41 @@ hash rules: changes: - data/data.min.json -install addon: +install dependencies: image: node:latest stage: install script: - npm install - cache: - paths: - - node_modules/ - artifacts: - expire_in: 7 days - when: on_success - paths: - - node_modules/ -test addon: +test:lint: image: node:latest stage: test dependencies: - - install addon + - install dependencies + script: + - npm run lint + +test:vulnerabilities: + image: node:latest + stage: test + dependencies: + - install dependencies + script: + - npm run vuln-test + +test:addon: + image: node:latest + stage: test + dependencies: + - install dependencies script: - npm test + coverage: All files[^|]*\|[^|]*\s+([\d\.]+) + artifacts: + when: always + paths: + - coverage + expire_in: 30 days bundle addon: stage: build