Skip to content

Commit 7b6e90e

Browse files
devversionjosephperrott
authored andcommitted
build: run e2e tests on circlci (#13643)
1 parent f3057fa commit 7b6e90e

File tree

3 files changed

+31
-13
lines changed

3 files changed

+31
-13
lines changed

.circleci/config.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ var_8: &copy_bazel_config
5252
# Set up the CircleCI specific bazel configuration.
5353
run: sudo cp ./.circleci/bazel.rc /etc/bazel.bazelrc
5454

55+
# Sets up a different Docker image that includes a moe recent Firefox version which
56+
# is needed for headless testing.
57+
var_9: &docker-firefox-image
58+
# TODO(devversion): Temporarily use a image that includes Firefox 62 because the
59+
# ngcontainer image does include an old Firefox version that does not support headless.
60+
# See the PR that fixes this: https://github.com/angular/angular/pull/26435
61+
- image: circleci/node:10.12-browsers
62+
5563
# -----------------------------
5664
# Container version of CircleCI
5765
# -----------------------------
@@ -85,11 +93,7 @@ jobs:
8593
# The available browsers are installed through the angular/ngcontainer Docker image.
8694
# ------------------------------------------------------------------------------------------
8795
tests_local_browsers:
88-
docker:
89-
# TODO(devversion): Temporarily use a image that includes Firefox 62 because the
90-
# ngcontainer image does include an old Firefox version that does not support headless.
91-
# See the PR that fixes this: https://github.com/angular/angular/pull/26435
92-
- image: circleci/node:10.12-browsers
96+
docker: *docker-firefox-image
9397
resource_class: xlarge
9498
environment:
9599
TEST_PLATFORM: local
@@ -104,6 +108,23 @@ jobs:
104108

105109
- *save_cache
106110

111+
# ----------------------------------------------------------------
112+
# Job that runs the e2e tests with Protractor and Chrome w/ Xvfb. We cannot use
113+
# Chrome headless because our tests rely on APIs which are not testable in headless mode.
114+
# For example: the Fullscreen browser API.
115+
# ----------------------------------------------------------------
116+
e2e_tests:
117+
docker: *docker-firefox-image
118+
resource_class: xlarge
119+
steps:
120+
- *checkout_code
121+
- *restore_cache
122+
- *yarn_install
123+
124+
- run: xvfb-run -a --server-args='-screen 0, 1024x768x16' yarn gulp ci:e2e
125+
126+
- *save_cache
127+
107128
# ----------------------------------
108129
# Lint job. Runs the gulp lint task.
109130
# ----------------------------------
@@ -138,6 +159,10 @@ workflows:
138159
jobs:
139160
- tests_local_browsers
140161

162+
integration_tests:
163+
jobs:
164+
- e2e_tests
165+
141166
# Lint workflow. As we want to lint in one job, this is a workflow with just one job.
142167
lint:
143168
jobs:

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
- env: "MODE=aot"
2929
- env: "MODE=payload"
3030
- env: "MODE=prerender"
31-
- env: "MODE=e2e"
3231
- env: "MODE=saucelabs_required"
3332
- env: "MODE=browserstack_required"
3433
- env: "DEPLOY_MODE=build-artifacts"

test/protractor.conf.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,8 @@ exports.config = {
3636
capabilities: {
3737
browserName: 'chrome',
3838

39-
chromeOptions: {
40-
// Inside of Travis, we need to specify `--no-sandbox` because otherwise Chrome cannot
41-
// be launched properly due to insufficient permissions in a non-sudo environment.
42-
args: process.env['TRAVIS'] ? ['--no-sandbox'] : [],
43-
},
44-
4539
// Enables concurrent testing in the Webdriver. Currently runs three e2e files in parallel.
4640
shardTestFiles: true,
47-
maxInstances: 3,
41+
maxInstances: 5,
4842
}
4943
};

0 commit comments

Comments
 (0)