Skip to content

Commit d1838ad

Browse files
kauanAfonsodhmlau
authored andcommitted
fix: ci install and configure Chrome for Puppeteer across platforms
Signed-off-by: kauanAfonso <kauan.afonso@ibm.com>
1 parent d4c179f commit d1838ad

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/continuous-integration.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,28 @@ jobs:
4444
env:
4545
PYTHON: ${{env.pythonLocation}}/bin/python3
4646
run: npm ci
47+
- name: Install Chrome (Linux)
48+
if: runner.os == 'Linux'
49+
run: |
50+
sudo apt-get update
51+
sudo apt-get install -y google-chrome-stable
52+
- name: Install Chrome (macOS)
53+
if: runner.os == 'macOS'
54+
run: |
55+
brew install --cask google-chrome
56+
- name: Install Chrome (Windows)
57+
if: runner.os == 'Windows'
58+
run: |
59+
choco install googlechrome --ignore-checksums -y
60+
- name: Set Chrome path (Linux)
61+
if: runner.os == 'Linux'
62+
run: echo "PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome" >> $GITHUB_ENV
63+
- name: Set Chrome path (macOS)
64+
if: runner.os == 'macOS'
65+
run: echo "PUPPETEER_EXECUTABLE_PATH=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" >> $GITHUB_ENV
66+
- name: Set Chrome path (Windows)
67+
if: runner.os == 'Windows'
68+
run: echo "PUPPETEER_EXECUTABLE_PATH=C:/Program Files/Google/Chrome/Application/chrome.exe" >> $env:GITHUB_ENV
4769
- name: Build
4870
run: node packages/build/bin/compile-package -b
4971
- name: Run package tests

0 commit comments

Comments
 (0)