diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 187aceb..5e8cd10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ name: CI env: SYMFONY_DEPRECATIONS_HELPER: disabled BROWSERTEST_OUTPUT_DIRECTORY: 'public/sites/simpletest' + SIMPLETEST_BASE_URL: http://app:8888 jobs: tests: runs-on: ubuntu-latest @@ -15,8 +16,13 @@ jobs: php-versions: ['8.1', '8.2'] container: image: ghcr.io/city-of-helsinki/drupal-php-docker:${{ matrix.php-versions }}-alpine + options: --hostname app services: + chromium: + # @todo Update this to newer version once minkphp supports Selenium 4. + # @see https://github.com/minkphp/MinkSelenium2Driver/pull/372 + image: selenium/standalone-chrome:106.0 db: image: mariadb env: @@ -71,8 +77,7 @@ jobs: - name: Start services working-directory: ${{ env.DRUPAL_ROOT }} run: | - vendor/bin/drush runserver $SIMPLETEST_BASE_URL > /dev/null 2>&1 & - chromedriver --port=4444 > /dev/null 2>&1 & + vendor/bin/drush runserver $SIMPLETEST_BASE_URL --dns > /dev/null 2>&1 & - name: Run PHPUnit tests working-directory: ${{ env.DRUPAL_ROOT }} diff --git a/phpunit.xml b/phpunit.xml index 4851550..b7bfdd4 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,24 +1,25 @@ + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" + colors="true" + cacheResultFile=".phpunit.cache/test-results" + executionOrder="depends,defects" + forceCoversAnnotation="true" + beStrictAboutTestsThatDoNotTestAnything="true" + beStrictAboutOutputDuringTests="true" + beStrictAboutChangesToGlobalState="true" + beStrictAboutCoversAnnotation="true" + printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter" + failOnRisky="true" + failOnWarning="true" + failOnSkipped="true" + verbose="true"> - +