Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Commit

Permalink
CI: update Travis-CI for recent Selenium removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgibbs committed Jun 23, 2019
1 parent 08a88b5 commit 52831e5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
16 changes: 6 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ cache:
apt: true
directories:
- $HOME/.composer/cache/files
- $HOME/.npm

git:
depth: 3
Expand All @@ -39,8 +38,8 @@ env:
- WP_VERSION="~5.1"
- WP_WEBROOT="tests/app/www/"
matrix:
- LABEL="wpcli" BEHAT_PARAMS="{\"extensions\":{\"Behat\\\\MinkExtension\":{\"base_url\":\"http://localhost:8000\"},\"PaulGibbs\\\\WordpressBehatExtension\":{\"default_driver\":\"wpcli\",\"path\":\"$WP_WEBROOT\"}}}"
- LABEL="wpphp" BEHAT_PARAMS="{\"extensions\":{\"Behat\\\\MinkExtension\":{\"base_url\":\"http://localhost:8000\"},\"PaulGibbs\\\\WordpressBehatExtension\":{\"default_driver\":\"wpphp\",\"path\":\"$WP_WEBROOT\"}}}"
- LABEL="wpcli" BEHAT_PARAMS="{\"PaulGibbs\\\\WordpressBehatExtension\":{\"default_driver\":\"wpcli\"}}"
- LABEL="wpphp" BEHAT_PARAMS="{\"PaulGibbs\\\\WordpressBehatExtension\":{\"default_driver\":\"wpphp\"}}"

before_install:
- phpenv config-rm xdebug.ini
Expand All @@ -50,18 +49,15 @@ install:
- travis_retry composer global require $DEFAULT_COMPOSER_FLAGS hirak/prestissimo
- travis_retry composer install $DEFAULT_COMPOSER_FLAGS
- travis_retry composer require roots/wordpress $WP_VERSION
- npm install selenium-standalone@latest -g
- selenium-standalone install

# Start webserver.
- php -S localhost:8000 -t $WP_WEBROOT 2>/dev/null &
- sleep 10
- sleep 5
- scripts/install.sh

before_script:
# Start Selenium.
- xvfb-run --server-args="-screen 0 1920x1080x24" selenium-standalone start 2>&1 1>/dev/null &
- sleep 20
# Start Chrome.
- google-chrome-stable --headless --disable-gpu --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 &
- sleep 5

script:
- curl -I http://localhost:8000
Expand Down
1 change: 1 addition & 0 deletions behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ default:
validate_certificate: false

PaulGibbs\WordpressBehatExtension:
default_driver: wpcli
users:
-
roles:
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@
"vendor/bin/behat --config tests/app/behat-ci.yml --colors --format progress"
],
"test:behat-local": [
"echo 'Make sure Selenium is running!'",
"BEHAT_PARAMS='{\"extensions\":{\"Behat\\\\MinkExtension\":{\"base_url\":\"http://behat.local\"},\"PaulGibbs\\\\WordpressBehatExtension\":{\"default_driver\":\"wpcli\",\"site_url\":\"http://behat.local/wp\",\"wpcli\":{\"alias\":\"dev\"}}}}' vendor/bin/behat --colors"
"vendor/bin/behat --colors"
]
}
}
2 changes: 2 additions & 0 deletions tests/app/behat-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ default:

extensions:
Behat\MinkExtension:
base_url: http://localhost:8000
browser_name: chrome
default_session: headless
javascript_session: javascript
Expand All @@ -30,6 +31,7 @@ default:
validate_certificate: false

PaulGibbs\WordpressBehatExtension:
path: tests/app/www/
users:
-
roles:
Expand Down

0 comments on commit 52831e5

Please sign in to comment.