Skip to content

Commit fd22a01

Browse files
authored
Merge pull request #294 from Center-for-AI-Innovation/fix-e2e-test
Use stable version of chrome for github action
2 parents a9e391a + 20e59f6 commit fd22a01

File tree

4 files changed

+9
-458
lines changed

4 files changed

+9
-458
lines changed

.github/workflows/e2e-prod-status-test.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ jobs:
1818
node-version: '18'
1919
- name: Install dependencies
2020
run: npm install
21-
- name: Update ChromeDriver dependency
22-
run: npm install chromedriver@latest
23-
- name: Install Chrome
24-
run: |
25-
sudo apt-get update
26-
sudo apt-get install -y chromium-browser
21+
- name: Set up Chrome
22+
id: setup_chrome
23+
uses: browser-actions/setup-chrome@latest
24+
with:
25+
chrome-version: stable
26+
install-chromedriver: true
2727
- name: Run Nightwatch e2e tests on Prod
28+
env:
29+
CHROME_BIN: ${{ steps.setup_chrome.outputs.chrome-path }}
2830
run: npx nightwatch nightwatch/e2e-test-of-uiucchat-prod.js

nightwatch.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ module.exports = {
3333

3434
webdriver: {
3535
start_process: true,
36-
server_path: require('chromedriver').path,
3736
port: 9515,
3837
},
3938

@@ -55,6 +54,7 @@ module.exports = {
5554
desiredCapabilities: {
5655
browserName: 'chrome',
5756
'goog:chromeOptions': {
57+
binary: process.env.CHROME_BIN || undefined,
5858
args: [
5959
'--headless=new',
6060
'--no-sandbox',

0 commit comments

Comments
 (0)