.travis.yml
os:
- linux
dist: trusty
sudo: false
env:
global:
- COMMIT_AUTHOR_EMAIL: meiblorn@gmail.com
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- tree
git:
depth: 5
branches:
except:
- gh-pages
language: node_js
node_js:
- "8"
cache:
directories:
- node_modules
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 10
install:
- npm install
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
script:
- npm run test:ci
- npm run build:release
after_script:
- ./cc-test-reporter format-coverage $(pwd)/coverage/lcov.info --debug --input-type lcov --output coverage/lcov.json
- ./cc-test-reporter sum-coverage $(pwd)/coverage/lcov.json --parts 1
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi
after_success:
- chmod -R a+x scripts
- bash ./scripts/git/gh-pages.sh
- bash ./scripts/npm/publish.sh