Use cache for 'npm ci'
[MAILPOET-1837]
This commit is contained in:
@@ -11,7 +11,9 @@ jobs:
|
|||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: composer-{{ checksum "composer.json" }}-{{ checksum "composer.lock" }}
|
key: composer-{{ checksum "composer.json" }}-{{ checksum "composer.lock" }}
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: npm-{{ checksum "package.json" }}
|
keys:
|
||||||
|
- npm-{{ checksum "package-lock.json" }}
|
||||||
|
- npm- # fallback to most recent npm-* if not found by checksum
|
||||||
- run:
|
- run:
|
||||||
name: "Set up test environment"
|
name: "Set up test environment"
|
||||||
command: |
|
command: |
|
||||||
@@ -33,9 +35,9 @@ jobs:
|
|||||||
paths:
|
paths:
|
||||||
- vendor
|
- vendor
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: npm-{{ checksum "package.json" }}
|
key: npm-{{ checksum "package-lock.json" }}
|
||||||
paths:
|
paths:
|
||||||
- node_modules
|
- ~/.npm
|
||||||
- run:
|
- run:
|
||||||
name: "Composer security check"
|
name: "Composer security check"
|
||||||
command: |
|
command: |
|
||||||
|
@@ -8,7 +8,7 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
return $this->taskExecStack()
|
return $this->taskExecStack()
|
||||||
->stopOnFail()
|
->stopOnFail()
|
||||||
->exec('./composer.phar install')
|
->exec('./composer.phar install')
|
||||||
->exec('npm ci')
|
->exec('npm ci --prefer-offline')
|
||||||
->run();
|
->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
build.sh
2
build.sh
@@ -19,7 +19,7 @@ mkdir $plugin_name
|
|||||||
# Production assets.
|
# Production assets.
|
||||||
echo '[BUILD] Generating production CSS and JS assets'
|
echo '[BUILD] Generating production CSS and JS assets'
|
||||||
rm -rf node_modules
|
rm -rf node_modules
|
||||||
npm ci
|
npm ci --prefer-offline
|
||||||
./do compile:all --env production
|
./do compile:all --env production
|
||||||
|
|
||||||
# Dependency injection container cache.
|
# Dependency injection container cache.
|
||||||
|
Reference in New Issue
Block a user