Update .gitlab-ci.yml

This commit is contained in:
Kevin R
2020-09-10 00:44:16 +02:00
parent 2ac158ca88
commit 1df39c76f4

View File

@@ -5,6 +5,11 @@ before_script:
- apt-get update -y - apt-get update -y
- apt-get install -y zip unzip nodejs jsonlint - 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: stages:
- install - install
- test - test
@@ -37,27 +42,41 @@ hash rules:
changes: changes:
- data/data.min.json - data/data.min.json
install addon: install dependencies:
image: node:latest image: node:latest
stage: install stage: install
script: script:
- npm install - npm install
cache:
paths:
- node_modules/
artifacts:
expire_in: 7 days
when: on_success
paths:
- node_modules/
test addon: test:lint:
image: node:latest image: node:latest
stage: test stage: test
dependencies: 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: script:
- npm test - npm test
coverage: All files[^|]*\|[^|]*\s+([\d\.]+)
artifacts:
when: always
paths:
- coverage
expire_in: 30 days
bundle addon: bundle addon:
stage: build stage: build