.circleci/config.yml
---
version: 2.1
jobs:
build:
working_directory: ~/serverless-iiif
docker:
- image: cimg/node:lts
steps:
- checkout
- run:
name: Check for 'master' branch
command: |
git fetch --all --quiet --prune
if [[ -n "$(git branch --all --list master */master)" ]]; then
echo "A branch named 'master' was found. Please remove it."
echo "$(git branch --all --list master */master)"
fi
[[ -z "$(git branch --all --list master */master)" ]]
- restore_cache:
keys:
- node-modules-v1-{{ checksum "package-lock.json" }}-{{ .Branch }}
- node-modules-v1-{{ checksum "package-lock.json" }}-
- node-modules-v1-
- run:
name: Install JS Dependencies
command: npm install
- save_cache:
key: node-modules-v1-{{ checksum "package-lock.json" }}-{{ .Branch }}
paths:
- ~/serverless-iiif/node_modules
- run:
name: JS Tests
command: npm run-script test-coverage