Skip to content

Commit

Permalink
test: use xvfb-run instead of (broken) init.d script and fix nohup.out
Browse files Browse the repository at this point in the history
  • Loading branch information
stklcode committed Sep 17, 2024
1 parent 38b2c6d commit 61616c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Run tests
run: |
composer install --ignore-platform-req=php
./bin/behat.sh
xvfb-run -n 99 ./bin/behat.sh
env:
WORDPRESS_VERSION: ${{ matrix.wordpress }}
NAP_LENGTH: 10
Expand Down
5 changes: 2 additions & 3 deletions bin/behat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ wait_for_port() {
sleep $NAP_LENGTH
done
}

export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 1

#wget -c -nc --retry-connrefused --tries=0 https://bit.ly/2TlkRyu -O selenium-server-standalone.jar
wget -c -nc --retry-connrefused --tries=0 https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip -O driver.zip
Expand All @@ -39,7 +38,7 @@ export PATH=$PATH:$PWD
ls -la

echo "Run selenium server - background process"
nohup bash -c "google-chrome-stable --headless --disable-gpu --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 &" && sleep 1; cat nohup.out
nohup bash -c "google-chrome-stable --headless --disable-gpu --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 &" > nohup.out && sleep 1; cat nohup.out

wait_for_port
sleep 5
Expand Down

0 comments on commit 61616c3

Please sign in to comment.