jaxio / celerio-angular-quickstart

Generate an Angular 5 CRUD application from an existing database schema (we provide a sample one)
Apache License 2.0
479 stars 138 forks source link

travis: make chrome work #30

Closed nromanetti closed 7 years ago

nromanetti commented 7 years ago

we need chrome to start when doing CI with travis

jeanlouisboudart commented 7 years ago

According to the following website, this can be configured in karma.conf.js : http://blog.500tech.com/setting-up-travis-ci-to-run-tests-on-latest-google-chrome-version/

Add the following in karma.conf.js :

customLaunchers: {  
  Chrome_travis_ci: {
    base: 'Chrome',
    flags: ['--no-sandbox']
  }
}
if (process.env.TRAVIS) {
  config.browsers = ['Firefox', 'Chrome_travis_ci']
  config.singleRun = true
}

Here is a complete example : https://github.com/MrOrz/SeeSS/blob/master/test/karma.conf.js

jeanlouisboudart commented 7 years ago

The no sandbox option seems to be already generated by angular cli. I installe chrome and configured travis ci to use it. Builds is now green with karma tests enabled !