This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
3 changed files
with
83 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:6.14-browsers | ||
environment: | ||
# Fix issue with selenium-server in containers. | ||
# See http://github.com/SeleniumHQ/docker-selenium/issues/87 | ||
DBUS_SESSION_BUS_ADDRESS: /dev/null | ||
# Chrome v74 is the last version that works perfectly with Protractor. | ||
CHROME_REVISION: 638880 | ||
CHROMEDRIVER_VERSION: 74.0.3729.6 | ||
# To find this revision number: | ||
# 1. Find the exact chrome version you want: https://en.wikipedia.org/wiki/Google_Chrome_version_history | ||
# 2. Put that version in this tool: https://omahaproxy.appspot.com/ | ||
# 3. Take the bumber from "Branch Base Position" | ||
# 4. Look for the closest number to that revision in the snapshots: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/ | ||
# CHROME 74 - 638880 | ||
# CHROME 75 - 652421 | ||
# CHROME 79 - 706915 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install Dependencies | ||
command: | | ||
sudo apt-get update | ||
sudo apt-get install python-pip openjdk-8-jdk tcpdump | ||
# Install a specific version of Chrome (not latest) | ||
sudo rm -rf /opt/google | ||
sudo rm /usr/local/bin/chromedriver | ||
wget -q -O chrome.zip https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/${CHROME_REVISION}/chrome-linux.zip | ||
unzip chrome.zip | ||
rm chrome.zip | ||
sudo ln -sf ${PWD}/chrome-linux/chrome /usr/bin/chromium | ||
sudo ln -sf /usr/bin/chromium /usr/bin/chromium-browser | ||
sudo groupadd -r chrome && sudo useradd -r -g chrome -G audio,video chrome | ||
sudo mkdir -p /home/chrome/reports | ||
sudo chown -R chrome:chrome /home/chrome | ||
- restore_cache: | ||
key: node_modules-{{ .Branch }}-{{ checksum "package-lock.json" }} | ||
|
||
- run: | ||
name: NPM Install | ||
command: | | ||
npm i | ||
cd testapp && npm i | ||
- save_cache: | ||
key: node_modules-{{ .Branch }}-{{ checksum "package-lock.json" }} | ||
paths: | ||
- "node_modules" | ||
- "testapp/node_modules" | ||
|
||
- run: | ||
name: Lint | ||
command: ./node_modules/.bin/gulp lint | ||
|
||
- run: | ||
name: Selenium Start | ||
background: true | ||
command: | | ||
./node_modules/.bin/webdriver-manager update --versions.standalone=3.141.59 --versions.chrome=${CHROMEDRIVER_VERSION} --versions.gecko=v0.26.0 | ||
sudo cp ./node_modules/webdriver-manager/selenium/chromedriver_${CHROMEDRIVER_VERSION} /usr/local/bin/chromedriver | ||
./node_modules/.bin/webdriver-manager start --versions.standalone=3.141.59 --versions.chrome=${CHROMEDRIVER_VERSION} --versions.gecko=v0.26.0 | ||
- run: | ||
name: TestApp Start | ||
background: true | ||
command: | | ||
npm start | ||
- run: | ||
name: Test | ||
command: npm test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters