improve node_modules caching
This commit is contained in:
parent
4432092930
commit
6c6407f124
1 changed files with 13 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- mytest
|
||||
- prepare
|
||||
- test
|
||||
- build
|
||||
- deploy
|
||||
|
@ -12,17 +12,25 @@ cache: &global_cache
|
|||
- package-lock.json
|
||||
policy: pull
|
||||
paths:
|
||||
- .npm/
|
||||
- node_modules/
|
||||
|
||||
install-dependencies:
|
||||
stage: prepare
|
||||
script:
|
||||
- npm install
|
||||
cache:
|
||||
<<: *global_cache
|
||||
policy: pull-push
|
||||
# only:
|
||||
# changes:
|
||||
# - package-lock.json
|
||||
|
||||
lint:
|
||||
stage: test
|
||||
before_script:
|
||||
- npm ci --cache .npm --prefer-offline
|
||||
script:
|
||||
- npm run lint
|
||||
cache:
|
||||
<<: *global_cache
|
||||
policy: pull-push
|
||||
|
||||
# Test:
|
||||
# stage: Test
|
||||
|
@ -33,8 +41,6 @@ lint:
|
|||
|
||||
build:
|
||||
stage: build
|
||||
before_script:
|
||||
- npm ci --cache .npm --prefer-offline
|
||||
script:
|
||||
- npm run build
|
||||
cache:
|
||||
|
|
Loading…
Reference in a new issue