crud-object-diff
Version:
Helper utilities to compare objects or arrays for obtaining created, updated, & deleted values.
50 lines (49 loc) • 1.45 kB
YAML
version: 2
jobs:
node/test:
docker:
- image: cimg/node:13.11.0
steps:
- checkout
- run:
command: |
if [ ! -f "package.json" ]; then
echo
echo "---"
echo "Unable to find your package.json file. Did you forget to set the app-dir parameter?"
echo "---"
echo
echo "Current directory: $(pwd)"
echo
echo
echo "List directory: "
echo
ls
exit 1
fi
name: Checking for package.json.
working_directory: ~/project
- restore_cache:
keys:
- node-deps-v1-{{ .Branch }}-{{ checksum "~/project/package-lock.json" }}
- run:
command: "if [[ ! -z \"\" ]]; then\n echo \"Running override package installation command:\"\n \nelse\n npm ci\nfi\n"
name: Installing NPM packages
working_directory: ~/project
- save_cache:
key: node-deps-v1-{{ .Branch }}-{{ checksum "~/project/package-lock.json" }}
paths:
- ~/.npm
- run:
command: npm start
name: Compile typescript files
working_directory: ~/project
- run:
command: npm run test
name: Run NPM Tests
working_directory: ~/project
workflows:
node-tests:
jobs:
- node/test
version: 2