Skip to content

Commit

Permalink
build: remove travisci leftovers (angular#27979)
Browse files Browse the repository at this point in the history
PR Close angular#27979
  • Loading branch information
devversion authored and AndrewKushnir committed Jan 9, 2019
1 parent c7346bf commit c7d1890
Show file tree
Hide file tree
Showing 19 changed files with 27 additions and 129 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ If the commit reverts a previous commit, it should begin with `revert: `, follow
Must be one of the following:

* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
* **ci**: Changes to our CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
Expand Down
9 changes: 0 additions & 9 deletions aio/content/examples/upgrade-phonecat-2-hybrid/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ module.exports = function(config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},

customLaunchers: {
// From the CLI. Not used here but interesting
// chrome setup for travis CI using chromium
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},

files: [
// System.js for module loading
'node_modules/systemjs/dist/system.src.js',
Expand Down
9 changes: 0 additions & 9 deletions aio/content/examples/upgrade-phonecat-3-final/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ module.exports = function(config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},

customLaunchers: {
// From the CLI. Not used here but interesting
// chrome setup for travis CI using chromium
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},

files: [
// System.js for module loading
'node_modules/systemjs/dist/system.src.js',
Expand Down
2 changes: 1 addition & 1 deletion aio/content/guide/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Continuous integration (CI) servers let you set up your project repository so th
There are paid CI services like Circle CI and Travis CI, and you can also host your own for free using Jenkins and others.
Although Circle CI and Travis CI are paid services, they are provided free for open source projects.
You can create a public project on GitHub and add these services without paying.
Contributions to the Angular repo are automatically run through a whole suite of Circle CI and Travis CI tests.
Contributions to the Angular repo are automatically run through a whole suite of Circle CI tests.

This article explains how to configure your project to run Circle CI and Travis CI, and also update your test configuration to be able to run tests in the Chrome browser in either environment.

Expand Down
7 changes: 0 additions & 7 deletions aio/scripts/test-pwa-score.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ const LIGHTHOUSE_FLAGS = {logLevel: 'info'};
const SKIPPED_HTTPS_AUDITS = ['redirects-http'];
const VIEWER_URL = 'https://googlechrome.github.io/lighthouse/viewer/';


// Specify the path and flags for Chrome on Travis.
if (process.env.TRAVIS) {
process.env.LIGHTHOUSE_CHROMIUM_PATH = process.env.CHROME_BIN;
CHROME_LAUNCH_OPTS.chromeFlags = ['--no-sandbox'];
}

// Be less verbose on CI.
if (process.env.CI) {
LIGHTHOUSE_FLAGS.logLevel = 'error';
Expand Down
8 changes: 1 addition & 7 deletions aio/src/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,8 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['CustomChrome'],
browsers: ['Chrome'],
browserNoActivityTimeout: 60000,
singleRun: false,
customLaunchers: {
CustomChrome: {
base: 'Chrome',
flags: process.env.TRAVIS && ['--no-sandbox']
}
}
});
};
5 changes: 0 additions & 5 deletions aio/tests/deployment/e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ exports.config = {
suite: 'full',
capabilities: {
browserName: 'chrome',
// For Travis
chromeOptions: {
binary: process.env.CHROME_BIN,
args: ['--no-sandbox']
}
},
directConnect: true,
framework: 'jasmine',
Expand Down
5 changes: 0 additions & 5 deletions aio/tests/e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ exports.config = {
],
capabilities: {
browserName: 'chrome',
// For Travis
chromeOptions: {
binary: process.env.CHROME_BIN,
args: ['--no-sandbox']
}
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
Expand Down
2 changes: 1 addition & 1 deletion aio/tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ See the [README.md](cli-patches/README.md) for more details.
Many of the documentation pages contain snippets of code examples. We extract these snippets from real
working example applications, which are stored in subfolders of the `/aio/content/examples` folder. Each
example can be built and run independently. Each example also provides e2e specs, which are run as part
of our Travis build tasks, to verify that the examples continue to work as expected, as changes are made
of our CI build tasks, to verify that the examples continue to work as expected, as changes are made
to the core Angular libraries.

In order to build, run and test these examples independently we need to install dependencies into their
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ exports.config = {
],
capabilities: {
'browserName': 'chrome',
// For Travis CI only
chromeOptions: {
binary: process.env.CHROME_BIN,
args: ['--no-sandbox']
}
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
Expand Down
5 changes: 0 additions & 5 deletions aio/tools/examples/shared/protractor.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ exports.config = {
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome',
// For Travis
chromeOptions: {
binary: process.env.CHROME_BIN,
args: ['--no-sandbox']
}
},

// Framework to use. Jasmine is recommended.
Expand Down
2 changes: 1 addition & 1 deletion browser-providers.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// and BrowserStack (BS).
// If the target is set to null, then the browser is not run anywhere during CI.
// If a category becomes empty (e.g. BS and required), then the corresponding job must be commented
// out in Travis configuration.
// out in the CI configuration.
var CIconfiguration = {
'Chrome': {unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}},
'Firefox': {unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}},
Expand Down
4 changes: 2 additions & 2 deletions docs/DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ http://github.com/angular/core-builds.

You may find that your un-merged change needs some validation from external participants.
Rather than requiring them to pull your Pull Request and build Angular locally, you can
publish the `*-builds` snapshots just like our Travis build does.
publish the `*-builds` snapshots just like our CircleCI build does.

First time, you need to create the github repositories:

``` shell
$ export TOKEN=[get one from https://github.com/settings/tokens]
$ CREATE_REPOS=1 TRAVIS= ./scripts/ci/publish-build-artifacts.sh [github username]
$ CREATE_REPOS=1 ./scripts/ci/publish-build-artifacts.sh [github username]
```

For subsequent snapshots, just run
Expand Down
8 changes: 1 addition & 7 deletions modules/benchmarks/src/largetable/render3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,4 @@ export function main() {
}
}

const isBazel = location.pathname.indexOf('/all/') !== 0;
// isBazel needed while 'scripts/ci/test-e2e.sh test.e2e.protractor-e2e' is run
// on Travis
// TODO: port remaining protractor e2e tests to bazel protractor_web_test_suite rule
if (isBazel) {
main();
}
main();
24 changes: 6 additions & 18 deletions protractor-e2e.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,6 @@
// as this could exit node if the help script should be printed.
require('./dist/all/e2e_util/e2e_util').readCommandLine();

var BROWSER_OPTIONS = {
LocalChrome: {
'browserName': 'chrome',

// Enables concurrent testing. Currently runs four e2e files in parallel.
shardTestFiles: true,
maxInstances: 4,
},
ChromeOnTravis: {
browserName: 'chrome',
chromeOptions: {
'args': ['--no-sandbox'],
'binary': process.env.CHROME_BIN,
}
}
};

exports.config = {
onPrepare: function() { beforeEach(function() { browser.ignoreSynchronization = false; }); },
allScriptsTimeout: 11000,
Expand All @@ -36,7 +19,12 @@ exports.config = {
'**/key_events/**', // can't tell why this is failing
'**/sourcemap/**' // fails only on travis
],
capabilities: process.env.TRAVIS ? BROWSER_OPTIONS.ChromeOnTravis : BROWSER_OPTIONS.LocalChrome,
capabilities: {
'browserName': 'chrome',
// Enables concurrent testing. Currently runs four e2e files in parallel.
shardTestFiles: true,
maxInstances: 4,
},
directConnect: true,
baseUrl: 'http://localhost:8000/',
framework: 'jasmine2',
Expand Down
22 changes: 5 additions & 17 deletions protractor-examples-e2e.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,16 @@ require('reflect-metadata');

Error.stackTraceLimit = 9999;

var BROWSER_OPTIONS = {
LocalChrome: {
exports.config = {
onPrepare: function() { beforeEach(function() { browser.ignoreSynchronization = false; }); },
allScriptsTimeout: 11000,
specs: ['dist/examples/**/e2e_test/*_spec.js'],
capabilities: {
'browserName': 'chrome',

// Enables concurrent testing. Currently runs four e2e files in parallel.
shardTestFiles: true,
maxInstances: 4,
},
ChromeOnTravis: {
browserName: 'chrome',
chromeOptions: {
'args': ['--no-sandbox'],
'binary': process.env.CHROME_BIN,
}
},
};

exports.config = {
onPrepare: function() { beforeEach(function() { browser.ignoreSynchronization = false; }); },
allScriptsTimeout: 11000,
specs: ['dist/examples/**/e2e_test/*_spec.js'],
capabilities: process.env.TRAVIS ? BROWSER_OPTIONS.ChromeOnTravis : BROWSER_OPTIONS.LocalChrome,
directConnect: true,
baseUrl: 'http://localhost:8001/',
framework: 'jasmine2',
Expand Down
33 changes: 6 additions & 27 deletions protractor-perf.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,47 +17,26 @@ const isBazel = !!process.env.RUNFILES;
const BASE = isBazel ? 'angular/modules' : 'dist/all';
require(`./${BASE}/e2e_util/perf_util`).readCommandLine();

var CHROME_OPTIONS = {
const CHROME_OPTIONS = {
'args': ['--js-flags=--expose-gc', '--no-sandbox', '--headless', '--disable-dev-shm-usage'],
'perfLoggingPrefs': {
'traceCategories':
'v8,blink.console,devtools.timeline,disabled-by-default-devtools.timeline,blink.user_timing'
}
};

var BROWSER_CAPS = {
LocalChrome: {
const config = {
onPrepare: function() { beforeEach(function() { browser.ignoreSynchronization = false; }); },
restartBrowserBetweenTests: true,
allScriptsTimeout: 11000,
capabilities: {
'browserName': 'chrome',
chromeOptions: CHROME_OPTIONS,
loggingPrefs: {
performance: 'ALL',
browser: 'ALL',
}
},
ChromeOnTravis: {
browserName: 'chrome',
chromeOptions: mergeInto(CHROME_OPTIONS, {
'binary': process.env.CHROME_BIN,
}),
loggingPrefs: {
performance: 'ALL',
browser: 'ALL',
}
}
};

function mergeInto(src, target) {
for (var prop in src) {
target[prop] = src[prop];
}
return target;
}

const config = {
onPrepare: function() { beforeEach(function() { browser.ignoreSynchronization = false; }); },
restartBrowserBetweenTests: true,
allScriptsTimeout: 11000,
capabilities: process.env.TRAVIS ? BROWSER_CAPS.ChromeOnTravis : BROWSER_CAPS.LocalChrome,
directConnect: true,
framework: 'jasmine2',
jasmineNodeOpts: {
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/payload-size.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ addTimestamp() {
payloadData="$payloadData\"timestamp\": $timestamp, "
}

# Write travis commit message to global variable `$payloadData`.
# Write the commit message for the current CI commit range to global variable `$payloadData`.
# $1: string - The commit range for this build (in `<SHA-1>...<SHA-2>` format).
addMessage() {
commitRange="$1"
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock.readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ All of our npm dependencies are locked via the `yarn.lock` file for the followin

- our project has lots of dependencies which update at unpredictable times, so it's important that
we update them explicitly once in a while rather than implicitly when any of us runs `yarn install`
- locked dependencies allow us to reuse yarn cache on travis, significantly speeding up our builds
- locked dependencies allow us to reuse yarn cache on CircleCI, significantly speeding up our builds
(by 5 minutes or more)
- locked dependencies allow us to detect when node_modules folder is out of date after a branch switch
which allows us to build the project with the correct dependencies every time
Expand Down

0 comments on commit c7d1890

Please sign in to comment.