2018-03-18 04:08:48 +01:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
2020-03-16 20:36:09 +01:00
|
|
|
- image: circleci/node:10.16.3
|
2018-03-18 04:08:48 +01:00
|
|
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
2020-03-16 20:36:09 +01:00
|
|
|
- restore_cache:
|
|
|
|
key: node_modules-{{ checksum "package-lock.json" }}
|
|
|
|
|
2020-03-18 16:38:52 +01:00
|
|
|
- run: test -d node_modules || npm i
|
2018-03-18 04:08:48 +01:00
|
|
|
|
2020-03-16 20:36:09 +01:00
|
|
|
- save_cache:
|
2020-03-16 20:37:45 +01:00
|
|
|
key: node_modules-{{ checksum "package-lock.json" }}
|
2020-03-16 20:36:09 +01:00
|
|
|
paths:
|
|
|
|
- node_modules
|
|
|
|
|
2018-03-18 04:08:48 +01:00
|
|
|
# run tests!
|
2020-04-03 14:53:24 +02:00
|
|
|
- run: npm t || npm t || npm t
|