Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit d77731c

Browse files
committed
fix(release): Pin CircleCI to Chrome v74
We can't upgrade the version of Selenium without transitioning off the control flow and breaking a bunch of people. Chrome v75 introduced the new W3C actions API. Unfortunately, we can't update to support that API without introducing other breakages, so v74 is the last version of Chrome that will work with Protractor 5. You can download a Chrome v74 snapshot from https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/638880/chrome-linux.zip You might also need to pass "--no-sandbox" flag to Chrome
1 parent efe7fdd commit d77731c

File tree

3 files changed

+83
-74
lines changed

3 files changed

+83
-74
lines changed

.circleci/config.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: circleci/node:6.14-browsers
6+
environment:
7+
# Fix issue with selenium-server in containers.
8+
# See http://github.com/SeleniumHQ/docker-selenium/issues/87
9+
DBUS_SESSION_BUS_ADDRESS: /dev/null
10+
# Chrome v74 is the last version that works perfectly with Protractor.
11+
CHROME_REVISION: 638880
12+
CHROMEDRIVER_VERSION: 74.0.3729.6
13+
# To find this revision number:
14+
# 1. Find the exact chrome version you want: https://en.wikipedia.org/wiki/Google_Chrome_version_history
15+
# 2. Put that version in this tool: https://omahaproxy.appspot.com/
16+
# 3. Take the bumber from "Branch Base Position"
17+
# 4. Look for the closest number to that revision in the snapshots: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/
18+
# CHROME 74 - 638880
19+
# CHROME 75 - 652421
20+
# CHROME 79 - 706915
21+
steps:
22+
- checkout
23+
- run:
24+
name: Install Dependencies
25+
command: |
26+
sudo apt-get update
27+
sudo apt-get install python-pip openjdk-8-jdk tcpdump
28+
29+
# Install a specific version of Chrome (not latest)
30+
sudo rm -rf /opt/google
31+
sudo rm /usr/local/bin/chromedriver
32+
wget -q -O chrome.zip https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/${CHROME_REVISION}/chrome-linux.zip
33+
unzip chrome.zip
34+
rm chrome.zip
35+
sudo ln -sf ${PWD}/chrome-linux/chrome /usr/bin/chromium
36+
sudo ln -sf /usr/bin/chromium /usr/bin/chromium-browser
37+
sudo groupadd -r chrome && sudo useradd -r -g chrome -G audio,video chrome
38+
sudo mkdir -p /home/chrome/reports
39+
sudo chown -R chrome:chrome /home/chrome
40+
41+
- restore_cache:
42+
key: node_modules-{{ .Branch }}-{{ checksum "package-lock.json" }}
43+
44+
- run:
45+
name: NPM Install
46+
command: |
47+
npm i
48+
cd testapp && npm i
49+
50+
- save_cache:
51+
key: node_modules-{{ .Branch }}-{{ checksum "package-lock.json" }}
52+
paths:
53+
- "node_modules"
54+
- "testapp/node_modules"
55+
56+
- run:
57+
name: Lint
58+
command: ./node_modules/.bin/gulp lint
59+
60+
- run:
61+
name: Selenium Start
62+
background: true
63+
command: |
64+
./node_modules/.bin/webdriver-manager update --versions.standalone=3.141.59 --versions.chrome=${CHROMEDRIVER_VERSION} --versions.gecko=v0.26.0
65+
sudo cp ./node_modules/webdriver-manager/selenium/chromedriver_${CHROMEDRIVER_VERSION} /usr/local/bin/chromedriver
66+
./node_modules/.bin/webdriver-manager start --versions.standalone=3.141.59 --versions.chrome=${CHROMEDRIVER_VERSION} --versions.gecko=v0.26.0
67+
68+
- run:
69+
name: TestApp Start
70+
background: true
71+
command: |
72+
npm start
73+
74+
- run:
75+
name: Test
76+
command: npm test

circle.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

spec/environment.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ module.exports = {
1111
'browserName':
1212
(process.env.TEST_BROWSER_NAME || 'chrome'),
1313
'version':
14-
(process.env.TEST_BROWSER_VERSION || 'ANY')
14+
(process.env.TEST_BROWSER_VERSION || 'ANY'),
15+
'chromeOptions': {
16+
args: [
17+
"--no-sandbox"
18+
]
19+
}
1520
},
1621

1722
// Default http port to host the web server
@@ -25,4 +30,4 @@ module.exports = {
2530
'http://' + (process.env.HTTP_HOST || 'localhost') +
2631
':' + (process.env.HTTP_PORT || webServerDefaultPort)
2732

28-
};
33+
};

0 commit comments

Comments
 (0)