LoginSignup
5
3

More than 5 years have passed since last update.

Wercker に Chrome をインストールする

Last updated at Posted at 2018-04-27

Rails アプリケーションのE2Eテストを書きました。
構成は Capybara + Selenium + Headless Chrome です。

このE2Eテストを Wercker で実行するために、
下記のスクリプトで Wercker に Chrome をインストールしました。

- script:
  name: install chrome headless
  code: |
    apt-get update -y
    wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
    echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
    apt-get update -y
    apt-get install -y google-chrome-stable

注:

apt-get updateを実行時に下記のようなエラーがでることがあります。
Wercker のClear cacheを実行することで解消されます。

E: Release file for http://deb.debian.org/debian/dists/stretch-updates/InRelease is expired (invalid since 93d 8h 8min 57s). Updates for this repository will not be applied.
E: Release file for http://security.debian.org/dists/stretch/updates/InRelease is expired (invalid since 90d 6h 42min 53s). Updates for this repository will not be applied.

参考:
https://github.com/Quramy/angular-karma-chrome-headless-demo/blob/master/wercker.yml

@Quramy さん、ありがとうございます。

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3