Merge branch 'improve-pipeline' into 'master'

Improve caching of node_modules in ci pipeline

See merge request dungeonslayers/ds4!10
This commit is contained in:
Oliver Rümpelein 2020-12-30 22:07:59 +01:00
commit 410cea05c5

View file

@ -1,7 +1,7 @@
image: node:latest image: node:latest
stages: stages:
- mytest - prepare
- test - test
- build - build
- deploy - deploy
@ -12,17 +12,22 @@ cache: &global_cache
- package-lock.json - package-lock.json
policy: pull policy: pull
paths: paths:
- .npm/ - node_modules/
install-dependencies:
stage: prepare
script:
- npm install
cache:
<<: *global_cache
policy: pull-push
lint: lint:
stage: test stage: test
before_script:
- npm ci --cache .npm --prefer-offline
script: script:
- npm run lint - npm run lint
cache: cache:
<<: *global_cache <<: *global_cache
policy: pull-push
# Test: # Test:
# stage: Test # stage: Test
@ -33,8 +38,6 @@ lint:
build: build:
stage: build stage: build
before_script:
- npm ci --cache .npm --prefer-offline
script: script:
- npm run build - npm run build
cache: cache: