Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

Setup Chrome

v1.3.0

Setup Chrome

play

Setup Chrome

Install and setup Google Chrome and Chromium

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Setup Chrome

uses: browser-actions/[email protected]

Learn more about this action in browser-actions/setup-chrome

Choose a version

typescript-action status

setup-chrome

This action sets by Google Chrome/Chromium for use in actions by:

  • Install and setup latest Chromium
  • Cross platform runner (macOS, Linux, Windows)
  • Install Google Chrome by channel (stable, beta, dev, and canary)
  • Install by version number (88.0.4324, or 88.0)

Usage

See action.yml

Basic usage:

steps:
  - uses: browser-actions/setup-chrome@v1
  - run: chrome --version

Install Google Chrome Beta

steps:
  - uses: browser-actions/setup-chrome@v1
    with:
      chrome-version: beta
    id: setup-chrome
  - run: |
      echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }}
      ${{ steps.setup-chrome.outputs.chrome-path }} --version

Note that the installed binary depends on your installation spec.

The installed binary name depends on the version you specify and your platform. The summarized binary names are the following:

OS \ installed version latest (default) commit position (e.g. 848897) channel name (e.g. dev)
Windows chrome chrome chrome
macOS chromium chromium chrome
Linux chrome chrome chrome

Be sure to pass a full-path to chrome or chromium to your test system if the system expects that chromium exists in PATH such as karma-chromium-runner:

CHROMIUM_BIN=$(which chrome) npm run test

Parameters

  • chrome-version: (Optional) The Google Chrome/Chromium version to be installed. Available value is one of the following:

    • Chromium by a commit position like 848897. You can find commit positions from here.
    • Chromium latest snapshot latest
    • Google Chrome release channels: stable, beta, dev and canary

    Default: latest

License

MIT