.travis.yml
language: node_js
node_js:
- lts/*
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- 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:
- gulp test --coverage
- gulp lint
- gulp package
- gulp bower
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
# IMPORTANT: scripts require GITHUB_AUTH_TOKEN and GITHUB_AUTH_EMAIL environment variables
# IMPORTANT: scripts has to be set executables in the Git repository (error 127)
# https://github.com/travis-ci/travis-ci/issues/5538#issuecomment-225025939
# http://stackoverflow.com/a/15572639
deploy:
- provider: script
script: ./scripts/release.sh
skip_cleanup: true
on:
branch: release
- provider: releases
api_key: $GITHUB_AUTH_TOKEN
file:
- "./dist/chartjs-plugin-datasource.js"
- "./dist/chartjs-plugin-datasource.min.js"
- "./dist/chartjs-plugin-datasource.zip"
skip_cleanup: true
on:
tags: true
- provider: npm
email: $NPM_AUTH_EMAIL
api_key: $NPM_AUTH_TOKEN
skip_cleanup: true
on:
tags: true