diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..20531db --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +node_js: + - "8.7.0" + +addons: + apt: + sources: + - google-chrome + packages: + - google-chrome-stable + +before_script: + - set -e + - npm i + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + +script: + - npm run lint + - npm run test + - npm run e2e + - npm run build -- --prod --base-href / diff --git a/README.md b/README.md index b9cf916..54981da 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Angular: How To +[![Build Status](https://travis-ci.org/brunolm/angular-how-to.svg?branch=master)](https://travis-ci.org/brunolm/angular-how-to) Each Pull Request will contain explanation and steps taken to complete a feature. - [Create a new Angular project](https://github.com/brunolm/angular-how-to/pull/1) +- [Add project on Travis CI](https://github.com/brunolm/angular-how-to/pull/2) diff --git a/package.json b/package.json index 0b35e24..2c68986 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "test": "ng test", + "test": "ng test --watch=false", + "test-watch": "ng test --watch=false", "lint": "ng lint", "e2e": "ng e2e" },