Run npm install only when needed

feature/default_network_editable
Bruno Barbieri 6 years ago committed by GitHub
parent d9c78fc645
commit af04ca59e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      .circleci/config.yml

@ -108,7 +108,10 @@ jobs:
- run:
name: Install deps via npm
command: |
sudo npm install -g npm@6
# Only run npm install if the package-lock.json or package.json was changed
CHANGED_FILES="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
echo "$CHANGED_FILES" | grep --quiet "package.*json" &&
sudo npm install -g npm@6 &&
npm install
- save_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}

Loading…
Cancel
Save