|
|
|
@ -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 |
|
|
|
|