.travis.yml
sudo: required
dist: trusty
language: node_js
node_js: stable
env:
global:
- CC_TEST_REPORTER_ID=2271c34d4b24dab2d2867860133a62654442f637117c09195c7f6bb349073033
git:
depth: 3
lfs_skip_smudge: true
notifications:
email: false
cache:
directories: node_modules
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- google-chrome-beta
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
- npm install
- npm install -g angular-cli
- npm install -g karma
before_script:
# Install code climate test reporter to submit test coverage to codeclimate
- 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
#- npm install -g codecov
#- npm install coveralls
- ng lint
- ng build --aot --prod
- ng serve & ng e2e
script:
- ng test --code-coverage --watch=false
after_script:
- "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT