Skip to content

Commit

Permalink
ci: always install chromedriver version that matches chrome version (d…
Browse files Browse the repository at this point in the history
…equelabs#3335)

* ci: always install chromedriver version that matches chrome version

* fix windows

* only install chromedriver in ci

* try nightly

* fix

* finalize

* always use latest chromedriver locally

* rename
  • Loading branch information
straker authored Jan 6, 2022
1 parent 833dd1c commit 2ca9fef
Show file tree
Hide file tree
Showing 3 changed files with 1,232 additions and 1,456 deletions.
16 changes: 16 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ restore_dependency_cache_win: &restore_dependency_cache_win
- v9-cache-win-{{ checksum "package-lock.json" }}
- v9-cache-win-

# install the version of chromedriver that matches the currently installed version of Chrome (taken from CircleCI chromedriver script)
install_linux_chromedriver: &install_linux_chromedriver
run:
name: Install Chromedriver
command: |
CHROME_VERSION="$(google-chrome --version)"
CHROME_VERSION_STRING="$(echo $CHROME_VERSION | sed 's/^Google Chrome //' | sed 's/^Chromium //')"
echo "Installed version of Google Chrome is $CHROME_VERSION_STRING"
CHROMEDRIVER_RELEASE="${CHROME_VERSION_STRING%%.*}"
echo "ChromeDriver $CHROMEDRIVER_RELEASE will be installed"
npm install --no-save "chromedriver@$CHROMEDRIVER_RELEASE"
jobs:
# Fetch and cache dependencies.
dependencies_unix:
Expand All @@ -46,6 +60,7 @@ jobs:
- <<: *set_npm_auth
- <<: *restore_dependency_cache_unix
- run: npm ci
- <<: *install_linux_chromedriver
- save_cache:
key: v9-cache-unix-{{ checksum "package-lock.json" }}
paths:
Expand Down Expand Up @@ -166,6 +181,7 @@ jobs:
command: |
wget https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb
sudo apt install ./google-chrome-beta_current_amd64.deb
- <<: *install_linux_chromedriver
- run:
name: Install Firefox Nightly
command: |
Expand Down
Loading

0 comments on commit 2ca9fef

Please sign in to comment.