Browse Source

back to selenium

pull/1013/head
Joe Corall 11 months ago committed by GitHub
parent
commit
fa36a29b28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 20
      .github/workflows/build-2.x.yml
  2. 2
      phpunit.xml

20
.github/workflows/build-2.x.yml

@ -22,8 +22,7 @@ jobs:
SCRIPT_DIR: ${{ github.workspace }}/islandora_ci
DRUPAL_DIR: /opt/drupal
PHPUNIT_FILE: ${{ github.workspace }}/build_dir/phpunit.xml
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox"]}}, "http://localhost:9515"]'
SIMPLETEST_BASE_URL: http://host.docker.internal:8282
MINK_DRIVER_ARGS_WEBDRIVER: '["firefox", null, "http://localhost:4444/wd/hub"]'
# The type of runner that the job will run on
runs-on: ubuntu-latest
@ -57,12 +56,10 @@ jobs:
- 8161:8161
- 61616:61616
- 61613:61613
chromedriver:
image: drupalci/webdriver-chromedriver:production
firefox:
image: selenium/standalone-firefox:3.141
ports:
- 9515:9515
# chromedriver needs to access drupal running on the host
options: --add-host=host.docker.internal:host-gateway
- 4444:4444
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
@ -125,12 +122,11 @@ jobs:
- name: Test scripts
run: $SCRIPT_DIR/travis_scripts.sh
- name: Add hosts to /etc/hosts
run: |
echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts
- name: PHPUNIT tests
run: |
cd $DRUPAL_DIR/web/core
$DRUPAL_DIR/vendor/bin/phpunit --verbose --testsuite "${{ matrix.test-suite }}"
docker logs $(docker container ls --format "{{.Names}}" | grep chromedriver)
drush watchdog:show
if [ "${{ matrix.test-suite }}" = "functional-javascript" ]; then
echo "Printing selenium logs"
docker logs $(docker container ls --format "{{.Names}}" | grep firefox)
fi

2
phpunit.xml

@ -28,7 +28,7 @@
<!-- Do not limit the amount of memory tests take to run. -->
<ini name="memory_limit" value="-1"/>
<!-- Example SIMPLETEST_BASE_URL value: http://localhost -->
<env name="SIMPLETEST_BASE_URL" value="http://localhost:8282"/>
<env name="SIMPLETEST_BASE_URL" value="http://127.0.0.1:8282"/>
<!-- Example SIMPLETEST_DB value: mysql://username:password@localhost/databasename#table_prefix -->
<env name="SIMPLETEST_DB" value="mysql://drupal:drupal@127.0.0.1/drupal"/>
<!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output -->

Loading…
Cancel
Save