I can’t get Travis CI to work properly with my existing project.
The build always exit with code 0 (passed) even if there are errors
Here is .travis.yml
sudo: required
dist: trusty
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
language: node_js
node_js:
- stable
before_install:
- npm i npm@^4 -g
install:
- npm install
script:
- npm run build
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3
notifications:
email: false
Here is a build test contains a linting error:
As you see it still pass with the error.
How can I fix this? How to cause the build to fail when there are linting errors?
Thanks.