Skip to content

Commit 0d89708

Browse files
authored
Merge pull request #34 from localgovdrupal/fix/php8.2/drupal-functional-tests
[PHP 8.2] ci: change chromedriver image to fix functional javascript tests
2 parents 001686e + cc895be commit 0d89708

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
- name: Create LocalGov Drupal project
3333
run: composer create-project --stability dev localgovdrupal/localgov-project ./html "${{ matrix.localgov-version }}"
3434

35+
- name: Obtain all dev dependencies for LocalGov Drupal
36+
run: jq --raw-output '.packages[] | select(.name | startswith("localgovdrupal/")) | ."require-dev" | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/composer.lock | sort | uniq | xargs composer --working-dir=./html require --dev --no-interaction
37+
3538
- name: Start Docker environment
3639
run: docker-compose up -d
3740

docker-compose.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
environment:
1717
SIMPLETEST_BASE_URL: 'http://drupal'
1818
SIMPLETEST_DB: 'mysql://database:database@database/database'
19-
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", { "chromeOptions": { "w3c": false } }, "http://chromedriver:4444/wd/hub"]'
19+
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName": "chrome", "goog:chromeOptions": {"args": ["--disable-gpu","--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://chromedriver:9515"]'
2020
SYMFONY_DEPRECATIONS_HELPER: weak
2121
extra_hosts:
2222
- "group-a1.drupal:127.0.0.1"
@@ -50,11 +50,18 @@ services:
5050
retries: 100
5151

5252
chromedriver:
53-
image: selenium/standalone-chrome:106.0
53+
image: drupalci/webdriver-chromedriver:production
5454
container_name: chromedriver
55-
environment:
56-
START_XVBF: 'false'
55+
ulimits:
56+
core:
57+
soft: -1
58+
hard: -1
5759
ports:
5860
- "4444:4444"
59-
volumes:
60-
- /dev/shm:/dev/shm
61+
- "9515:9515"
62+
entrypoint:
63+
- chromedriver
64+
- "--log-path=/tmp/chromedriver.log"
65+
- "--verbose"
66+
- "--allowed-ips="
67+
- "--allowed-origins=*"

0 commit comments

Comments
 (0)