Skip to content

Commit 6fed865

Browse files
committed
fix: coverage issue with saucelabs
1 parent ce0e933 commit 6fed865

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

scripts/ci/build-and-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ else
2626
fi
2727

2828
# Don't upload coverage for both test modes (browserstack and saucelabs) and inside of PRs.
29-
if [[ "$MODE" == "saucelabs_required" ]] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
29+
if [[ "$MODE" == "browserstack_required" ]] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
3030
$(npm bin)/gulp ci:coverage
3131
fi
3232

test/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ module.exports = (config) => {
100100
if (process.env['TRAVIS']) {
101101
let buildId = `TRAVIS #${process.env.TRAVIS_BUILD_NUMBER} (${process.env.TRAVIS_BUILD_ID})`;
102102

103-
if (process.env['TRAVIS_PULL_REQUEST'] === 'false') {
103+
if (process.env['TRAVIS_PULL_REQUEST'] !== 'false') {
104104
config.preprocessors['dist/@angular/material/**/!(*+(.|-)spec).js'] = ['coverage'];
105105
config.reporters.push('coverage');
106106
}

tools/gulp/tasks/coverage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ task('coverage:upload', () => {
99
throw new Error('No coverage file has been found!');
1010
}
1111

12-
if (!isTravisPushBuild()) {
12+
if (isTravisPushBuild()) {
1313
throw new Error('Coverage results will be only uploaded inside of Travis Push builds.');
1414
}
1515

0 commit comments

Comments
 (0)