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 accounts 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 configuration for your own needs.

sudo: requireddist: trustyaddons: apt: sources: - google-chrome packages: - google-chrome-stablelanguage: node_jsnode_js: - 6 - 7before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - npm install -g angular-cli - npm install -g karma - npm install # - ng buildinstall: - npm installscript: - karma start karma.conf.js --single-run

 

 

Tags: