circle.yml
machine:
node:
version: 6.9.1
general:
branches:
ignore:
- gh-pages
dependencies:
cache_directories:
- node_modules
override:
- npm install --no-progress && npm prune
test:
pre:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
override:
- node_modules/.bin/jscs -c .jscsrc src/ tests/src/
- node_modules/.bin/eslint -c .eslintrc src/ tests/src/
- make build
- XUNIT_FILE=$CIRCLE_TEST_REPORTS/junit/xunit.xml node_modules/.bin/mocha --harmony --recursive --reporter xunit-file -u tdd tests/lib
- make docs
post:
- cp -R coverage $CIRCLE_ARTIFACTS/
- cp -R docs $CIRCLE_ARTIFACTS/
- bash <(curl -s https://codecov.io/bash)
#echo "\n> Prepare tests for browsers"
#node_modules/.bin/gulp springbokjs-shim || exit 1
#echo "\n> Run browser tests"
#sudo start xvfb
#karma start karma.conf.js --single-run --browsers=Firefox,Chrome,PhantomJS || exit 1
deployment:
docs:
branch: master
commands:
- git config user.email "builds@circleci.com"
- git config user.name "CircleCi"
- mv coverage coverage-tmp
- mv docs docs-tmp
- git fetch
- git checkout -f gh-pages
- rm -Rf docs coverage
- mv docs-tmp docs
- mv coverage-tmp coverage
- date > date.txt
- git add -f docs coverage
- git commit -m"auto commit from circleci"
- git push -f origin gh-pages