Skip to content

Commit 9963f3e

Browse files
build: prevent chrome version mismatch in actions
When using the default selenium-standalone Chromedriver version there is a period of time where the Ubuntu container's Chrome version is behind by a major version, this causes the tests to fail when using the selenium-standalone service. Find the version of Chromedriver that is on the container and then use that to specify the Chromedriver version to use in the tests.
1 parent 7f46755 commit 9963f3e

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/webdriverio-testing-library.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ jobs:
2020
node-version: ${{ matrix.node }}
2121
- uses: actions/checkout@v2
2222
- run: npm install
23-
- run: npm run validate
23+
- name: npm run validate
24+
run: |
25+
export CHROMEDRIVER_VERSION="$(chromedriver --version | awk '{print $2}')"
26+
npm run validate
2427
env:
2528
CI: true
29+
2630
release:
2731
runs-on: ubuntu-latest
2832
needs: test

wdio.conf.selenium-standalone.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ exports.config = {
1414
},
1515
],
1616
services: [
17-
['selenium-standalone', {drivers: {firefox: true, chrome: true}}]
17+
[
18+
'selenium-standalone',
19+
{
20+
drivers: {
21+
firefox: true,
22+
chrome: process.env.CHROMEDRIVER_VERSION || true,
23+
},
24+
},
25+
],
1826
],
1927
}

0 commit comments

Comments
 (0)