Skip to content

Commit b0b178a

Browse files
committed
ISSUE-338: use docker
1 parent 7d1b622 commit b0b178a

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
experimental: true
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222

2323
- name: Set up PHP ${{ matrix.php-version }}
2424
uses: shivammathur/setup-php@v2
@@ -75,13 +75,19 @@ jobs:
7575

7676
- name: Start Test Server
7777
run: |
78+
sudo apt-get install -y jq
7879
cp -fv tests/ci/behat.yml tests/behat.yml
7980
cp -fv tests/ci/config.php public_html/lists/config/config.php
8081
mkdir -p output/screenshots
8182
mkdir -p build/mails
8283
chmod -R 777 output/screenshots build/mails
83-
./bin/start-selenium > output/selenium.log 2>&1 &
84-
sleep 5
84+
docker run -d -p 4444:4444 selenium/standalone-chrome:latest
85+
86+
# Wait until Selenium server reports "ready":true
87+
until [ "$(curl --silent --fail http://localhost:4444/wd/hub/status | jq -r '.value.ready')" = "true" ]; do
88+
echo 'Waiting for Selenium to start...'
89+
sleep 2
90+
done
8591
sudo php -S 0.0.0.0:80 -t public_html > /dev/null 2>&1 &
8692
continue-on-error: ${{ matrix.experimental }}
8793

tests/features/bootstrap/SubscriberContext.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
require __DIR__.'/bootstrap.php';
44

55
use Behat\Behat\Context\Context;
6-
use Behat\Gherkin\Node\TableNode;
76
use Behat\Gherkin\Node\PyStringNode;
87
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
98

@@ -25,10 +24,9 @@ public function beforeScenario(BeforeScenarioScope $scope)
2524

2625
/**
2726
* @param string $list
28-
* @param array $table
29-
*
30-
* @Given /I have "(.*)" list with the following subscribers:/
27+
* @param PyStringNode $stringNode
3128
* @throws Exception
29+
* @Given /I have "(.*)" list with the following subscribers:/
3230
*/
3331
public function iHaveSubscribersForList($list, PyStringNode $stringNode)
3432
{

0 commit comments

Comments
 (0)