node-red-contrib-dynamorse-file-io
Version:
Dynamorse File IO nodes for Node-RED
55 lines (53 loc) • 2.42 kB
YAML
version: 2
jobs:
build:
working_directory: ~/Streampunk/node-red-contrib-dynamorse-file-io
parallelism: 1
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
docker:
- image: circleci/node:10
steps:
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- restore_cache:
keys:
# This branch if available
- v1-dep-{{ .Branch }}-
# Default branch if not
- v1-dep-master-
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
- v1-dep-
- run: npm install
- run: npm install node-red-contrib-dynamorse-core --ignore-scripts
- run: npm install tap-xunit
- run: npm install node-red
- run: npm install nyc
- run: npm install pm2
- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
paths:
- ./node_modules
- run: mkdir ~/.node-red
- run: mkdir ~/.node-red/node_modules
- run: mkdir -p $CIRCLE_ARTIFACTS/node-red
- run: mkdir -p $CIRCLE_TEST_REPORTS/eslint
- run: mkdir -p $CIRCLE_TEST_REPORTS/xunit
- run: mkdir -p $CIRCLE_ARTIFACTS/nyc
- run: cd ~/.node-red/node_modules; ln -s ~/Streampunk/node-red-contrib-dynamorse-file-io/node_modules/node-red-contrib-dynamorse-core
- run: cd ~/.node-red/node_modules; ln -s ~/Streampunk/node-red-contrib-dynamorse-file-io
- run: echo 'export PATH="~/Streampunk/node-red-contrib-dynamorse-file-io/node_modules/.bin:$PATH"' >> $BASH_ENV
- run: pm2 start node_modules/.bin/nyc -l /tmp/circleci-artifacts/node-red/log.txt -- --all node_modules/.bin/node-red -u ~/.node-red
- run: sleep 20; node ~/.node-red/node_modules/node-red-contrib-dynamorse-core/scripts/dynamorse-setup.js
- run: eslint '**/*.js' -f junit -o /tmp/circleci-test-results/eslint/eslint.xml
- run: set -eo pipefail && npm test | tap-xunit > /tmp/circleci-test-results/xunit/results.xml
- run: pm2 stop nyc
- run: nyc report --reporter=lcov --report-dir=/tmp/circleci-artifacts/nyc
- store_test_results:
path: /tmp/circleci-test-results
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results