Skip to content

Commit 3d5e073

Browse files
iAmNathanJEthan Muller
iAmNathanJ
authored and
Ethan Muller
committed
fix: circleci config to work out of the box
- use npm ci in CI install - organize npm dependencies - add missing test dependency @babel/register - fix typos and cleanup
1 parent f33e6b7 commit 3d5e073

File tree

4 files changed

+2447
-682
lines changed

4 files changed

+2447
-682
lines changed

.circleci/config.yml

+11-17
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
build:
88
docker:
99
# specify the version you desire here
10-
- image: circleci/node:10.15
10+
- image: circleci/node:10.13.0-browsers
1111

1212
# Specify service dependencies here if necessary
1313
# CircleCI maintains a library of pre-built images
@@ -22,24 +22,18 @@ jobs:
2222
# Download and cache dependencies
2323
- restore_cache:
2424
keys:
25-
- v1-dependencies-{{ checksum "package.json" }}
26-
# fallback to using the latest cache if no exact match is found
27-
- v1-dependencies-
25+
# when lock file changes, use increasingly general patterns to restore cache
26+
- node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
27+
- node-v1-{{ .Branch }}-
28+
- node-v1-
2829

29-
- run:
30-
command: npm install
31-
working_directory: ~/repo/yaps
30+
- run: npm ci
3231

3332
- save_cache:
3433
paths:
35-
- node_modules
36-
key: v1-dependencies-{{ checksum "package.json" }}
34+
- ~/usr/local/lib/node_modules # location depends on npm version
35+
key: node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
3736

38-
# run eslint
39-
- run:
40-
command: npm run lint
41-
working_directory: ~/repo
42-
43-
# run tests!
44-
- run:
45-
command: npm test
37+
# run all linting and testing
38+
- run: npm run lint
39+
- run: npm t

0 commit comments

Comments
 (0)