aboutsummaryrefslogtreecommitdiffstats
path: root/.circleci/config.yml
diff options
context:
space:
mode:
authorBruno Barbieri <bruno.barbieri@consensys.net>2018-07-07 05:58:10 +0800
committerGitHub <noreply@github.com>2018-07-07 05:58:10 +0800
commitb4aaf30d6fe829f18dea68a5e6cc321b9fb00d4e (patch)
treef4b4e738398521a9c7c8fd7505286d3fcd23e7bb /.circleci/config.yml
parent484a1030994618f8635a02df649c4511ac160a48 (diff)
parent573659c863995d91035aee55407b5edc8851443d (diff)
downloadtangerine-wallet-browser-b4aaf30d6fe829f18dea68a5e6cc321b9fb00d4e.tar.gz
tangerine-wallet-browser-b4aaf30d6fe829f18dea68a5e6cc321b9fb00d4e.tar.zst
tangerine-wallet-browser-b4aaf30d6fe829f18dea68a5e6cc321b9fb00d4e.zip
Merge pull request #4743 from MetaMask/circle-ci-node-modules-caching-fix
Improve CircleCI workflow
Diffstat (limited to '.circleci/config.yml')
-rw-r--r--.circleci/config.yml62
1 files changed, 32 insertions, 30 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 0ad5cdf53..7063f3113 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -101,29 +101,31 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ keys:
+ - dependency-cache-{{ checksum "package-lock.json" }}
+ # fallback to using the latest cache if no exact match is found
+ - dependency-cache-
- run:
- name: Install deps via npm
- command: npm install
+ name: Install npm 6 + deps via npm
+ command: |
+ sudo npm install -g npm@6.1.0 && npm install
- save_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
paths:
- node_modules
- - save_cache:
- key: dependency-cache-{{ .Revision }}
- paths:
- - node_modules
prep-deps-firefox:
docker:
- image: circleci/node:8.11.3-browsers
steps:
- checkout
+ - restore_cache:
+ key: dependency-cache-firefox-
- run:
- name: Download Firefox
+ name: Download Firefox If needed
command: ./.circleci/scripts/firefox-download.sh
- save_cache:
- key: dependency-cache-firefox-{{ .Revision }}
+ key: dependency-cache-firefox-
paths:
- firefox
@@ -133,7 +135,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: build:dist
command: npm run dist
@@ -152,7 +154,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: build:dist
command: npm run doc
@@ -167,7 +169,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Get Scss Cache key
# this allows us to checksum against a whole directory
@@ -186,7 +188,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Test
command: npm run lint
@@ -197,7 +199,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Test
command: npx nsp check
@@ -208,7 +210,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
@@ -224,12 +226,12 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-firefox-{{ .Revision }}
+ key: dependency-cache-firefox-
- run:
name: Install firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
@@ -245,7 +247,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
@@ -261,12 +263,12 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-firefox-{{ .Revision }}
+ key: dependency-cache-firefox-
- run:
name: Install firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
@@ -282,7 +284,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
@@ -299,7 +301,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}
- restore_cache:
@@ -326,7 +328,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- restore_cache:
key: build-cache-{{ .Revision }}
- restore_cache:
@@ -349,7 +351,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: test:coverage
command: npm run test:coverage
@@ -362,12 +364,12 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-firefox-{{ .Revision }}
+ key: dependency-cache-firefox-
- run:
name: Install firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Get Scss Cache key
# this allows us to checksum against a whole directory
@@ -386,7 +388,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Get Scss Cache key
# this allows us to checksum against a whole directory
@@ -405,12 +407,12 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-firefox-{{ .Revision }}
+ key: dependency-cache-firefox-
- run:
name: Install firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Get Scss Cache key
# this allows us to checksum against a whole directory
@@ -429,7 +431,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: dependency-cache-{{ .Revision }}
+ key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Get Scss Cache key
# this allows us to checksum against a whole directory