Skip to main content
Image for post: NG Cli Travis configuration

NG Cli Travis configuration

To find a working configuration for an Angular v2+ Ng Cli application was not easy. I have built my own solution at the end and the build with Travis finally pass the tests. Remember to sync your Travis account if you have created a new repository: once you have logged in the Travis website, go to your user icon, click on the accountss link and then on the "Sync accounts" button.
Here is my .travis.yml file that you must include in the root of your project. Feel free to update and customize the configuraiton for your own needs.

sudo: required
dist: trusty
     - google-chrome
     - google-chrome-stable
language: node_js
 - 6
 - 7
 - export DISPLAY=:99.0
 - sh -e /etc/init.d/xvfb start
 - npm install -g angular-cli
 - npm install -g karma
 - npm install
 # - ng build
 - npm install
 - karma start karma.conf.js --single-run



Share this post

This website and/or any sub domains use cookies to understand how you to improve your experience.