.travis.yml
language: node_js
node_js:
- "node"
env:
global:
- CC_TEST_REPORTER_ID=0cc7cb0a3b014fb35268001381151197c74f26ffd2c81ca93b82ab4e4538744a
addons:
apt:
update: true
packages:
- tree
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/b85920202b6d9bac12fe
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
cache:
- bundler
- npm
install:
- npm install
- bundle install
jobs:
include:
- stage: Lint
script:
- ./lint.sh
- bundle exec danger
- stage: Test and analyze coverage
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- npm test
after_success:
- npm run coverage
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- stage: Build and publish webpage
script:
- bundle exec jekyll build
- babel main.js --out-file main-babel.js
- mv -v _site/main.js _site/main-original.js
- cp -v main-babel.js _site/main.js
- tree _site
deploy:
provider: pages
local-dir: _site
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
on:
branch: master