fix: coverage issue with saucelabs (#3540)

* Saucelabs seems to have issues with Edge and the `karma-coverage` plugin.

* Running on Browserstack seems to be work without any flakiness and also makes the build faster (runs less browsers than on saucelabs)
This commit is contained in:
Paul Gschwendtner
2017-03-10 19:41:49 +01:00
committed by tinayuangao
parent 675c9df9c2
commit 4d4a63e641
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ else
$(npm bin)/gulp ci:test
fi
# Don't upload coverage for both test modes (browserstack and saucelabs) and inside of PRs.
if [[ "$MODE" == "saucelabs_required" ]] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
# Upload coverage results if those are present.
if [ -f dist/coverage/coverage-summary.json ]; then
$(npm bin)/gulp ci:coverage
fi
+3 -1
View File
@@ -106,7 +106,9 @@ module.exports = (config) => {
if (process.env['TRAVIS']) {
let buildId = `TRAVIS #${process.env.TRAVIS_BUILD_NUMBER} (${process.env.TRAVIS_BUILD_ID})`;
if (process.env['TRAVIS_PULL_REQUEST'] === 'false') {
if (process.env['TRAVIS_PULL_REQUEST'] === 'false' &&
process.env['MODE'] === "browserstack_required") {
config.preprocessors['dist/@angular/material/**/!(*+(.|-)spec).js'] = ['coverage'];
config.reporters.push('coverage');
}