Drupal 10.2 update #3398
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run distribution tests | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- 'package.json' | |
- 'package-lock.json' | |
schedule: | |
- cron: '0 6 * * *' | |
env: | |
DRUPAL_TESTING_COMPOSER_PROJECT: thunder/thunder-project | |
DRUPAL_TESTING_COMPOSER_PROJECT_VERSION: "^4.0@stable" | |
DRUPAL_TESTING_DATABASE_USER: root | |
DRUPAL_TESTING_DATABASE_PASSWORD: root | |
DRUPAL_TESTING_TEST_DUMP_FILE: site-dump.tar.gz | |
DRUPAL_TESTING_DATABASE_ENGINE: mysql | |
DRUPAL_TESTING_TEST_CODING_STYLES: false | |
DRUPAL_TESTING_TEST_PROFILE: thunder | |
DRUPAL_TESTING_HTTP_PORT: 8888 | |
DRUPAL_TESTING_VERBOSE: false | |
DRUPAL_TESTING_VERSION: "^1.0.41" | |
DRUPAL_TESTING_TEST_FILTER: "" | |
DRUPAL_TESTING_SELENIUM_HOST: 127.0.0.1 | |
DRUPAL_TESTING_SELENIUM_PORT: 9515 | |
PHPSTAN_MEMORY_LIMIT: 4G | |
DRUPAL_TESTING_PARALLEL_TESTING: false | |
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://127.0.0.1:9515"]' | |
SIMPLETEST_BASE_URL: http://thunder-testing:8888 | |
SKIP_TEST_CLEANUP: true | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
services: | |
mysql: | |
image: mariadb:lts | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
strategy: | |
matrix: | |
PHP_VERSION: [ '8.1' ] | |
env: | |
DRUPAL_TESTING_TEST_DEPRECATION: true | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
php-version: ${{ matrix.PHP_VERSION }} | |
extensions: Imagick | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.composer/cache | |
key: ${{ runner.os }}-composer-cache-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer-cache- | |
- name: Get build environment | |
run: | | |
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true --no-plugins | |
composer global require thunder/drupal-testing:${DRUPAL_TESTING_VERSION} | |
- name: Prepare the build | |
run: test-drupal-project prepare_build | |
- name: Build the docroot | |
run: test-drupal-project build | |
- name: Test for deprecations | |
run: test-drupal-project deprecation | |
- name: Install drupal | |
run: test-drupal-project install | |
- name: Zip build | |
run: cd /tmp/test; tar cfz build-${{ matrix.PHP_VERSION }}.tgz thunder; mv build-${{ matrix.PHP_VERSION }}.tgz ${GITHUB_WORKSPACE} | |
- name: Upload build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-${{ matrix.PHP_VERSION }} | |
path: build-${{ matrix.PHP_VERSION }}.tgz | |
test-max: | |
needs: build | |
runs-on: ubuntu-20.04 | |
services: | |
mysql: | |
image: mariadb:lts | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
chrome: | |
image: drupalci/chromedriver:production | |
options: --add-host=thunder-testing:host-gateway --name chrome | |
ports: | |
- 9515:9515 | |
strategy: | |
fail-fast: false | |
matrix: | |
PHP_VERSION: [ '8.1' ] | |
CHUNK: [ 1, 2, 3 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
php-version: ${{ matrix.PHP_VERSION }} | |
extensions: :sodium, Imagick, gd, PDO, mysql, pdo_mysql, mbstring, xmlwriter, pdo, date, dom, filter, hash, json, pcre, session, SimpleXML, SPL, tokenizer, xml, curl | |
- name: Add host | |
run: echo "127.0.0.1 thunder-testing" | sudo tee -a /etc/hosts | |
- name: Prepare fixtures | |
run: docker cp ./tests/fixtures chrome:/fixtures | |
- name: Get build environment | |
run: | | |
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true --no-plugins | |
composer global require thunder/drupal-testing:${DRUPAL_TESTING_VERSION} | |
- name: Download build | |
uses: actions/download-artifact@v1 | |
with: | |
name: build-${{ matrix.PHP_VERSION }} | |
- name: Unzip build artifact | |
run: mkdir -p /tmp/test; tar xCfz /tmp/test build-${{ matrix.PHP_VERSION }}/build-${{ matrix.PHP_VERSION }}.tgz thunder; rm -rf build-${{ matrix.PHP_VERSION }} | |
- name: Setup Apache | |
uses: thunder/apache-shiva-php-action@v1 | |
with: | |
php-version: ${{ matrix.PHP_VERSION }} | |
site-directory: /tmp/test/thunder/install/docroot | |
http-port: ${{ env.DRUPAL_TESTING_HTTP_PORT }} | |
- name: Run tests | |
run: test-drupal-project run_tests | |
env: | |
THUNDER_TEST_CHUNK: ${{ matrix.CHUNK }} | |
DRUPAL_TESTING_TEST_PATH: /tmp/test/thunder/install/docroot/profiles/contrib/thunder/tests/src/TestSuites/ThunderTestSuite.php | |
test-upgrade: | |
runs-on: ubuntu-20.04 | |
services: | |
mysql: | |
image: mariadb:lts | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
chrome: | |
image: drupalci/chromedriver:production | |
options: --add-host=thunder-testing:host-gateway --name chrome | |
ports: | |
- 9515:9515 | |
strategy: | |
matrix: | |
PHP_VERSION: [ '8.1' ] | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'test-upgrade') || github.event_name == 'schedule' }} | |
env: | |
DRUPAL_TESTING_TEST_GROUP_EXCLUDE: "NoUpdate" | |
DRUPAL_TESTING_TEST_GROUP: Thunder | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
php-version: ${{ matrix.PHP_VERSION }} | |
extensions: Imagick, gd, pdo_mysql | |
tools: composer:2.4.4 | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.composer/cache | |
key: ${{ runner.os }}-composer-cache-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer-cache- | |
- name: Prepare fixtures | |
run: docker cp ./tests/fixtures chrome:/fixtures | |
- name: Add host | |
run: echo "127.0.0.1 thunder-testing" | sudo tee -a /etc/hosts | |
- name: Get build environment | |
run: | | |
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true --no-plugins | |
composer global require thunder/drupal-testing:${DRUPAL_TESTING_VERSION} | |
- name: Prepare the build | |
run: test-drupal-project prepare_build | |
- name: Use Thunder 6 lockfile | |
run: | | |
touch /tmp/test/thunder/finished-stages/build | |
cp ${GITHUB_WORKSPACE}/tests/fixtures/thunder6.composer.lock composer.lock | |
composer install | |
working-directory: /tmp/test/thunder/install | |
- name: Install drupal | |
run: test-drupal-project install | |
- name: Update the docroot | |
run: | | |
composer config repositories.0 path "${GITHUB_WORKSPACE}" | |
composer remove thunder/thunder-distribution --no-update | |
composer config name "drupal-testing-thunder/thunder-distribution" --working-dir="${GITHUB_WORKSPACE}" | |
composer require "drupal-testing-thunder/thunder-distribution:*" --no-update | |
composer require "drupal/ckeditor" --no-update | |
composer require "drupal/seven" --no-update | |
composer require "drupal/entity_browser" --no-update | |
composer require "drupal/thunder_admin" --no-update | |
composer require "drupal/shariff" --no-update | |
composer require "drupal/ctools" --no-update | |
composer require "drupal/core-dev:~10.0.0" --no-update | |
composer update | |
composer exec -- drush updb -y | |
cd docroot | |
php core/scripts/db-tools.php dump-database-d8-mysql --database-url "${SIMPLETEST_DB}" >"sites/default/database-dump.php" | |
tar -czf "${DRUPAL_TESTING_TEST_DUMP_FILE}" --exclude='config_*' --exclude='php' --exclude='styles' --directory='sites/default' files database-dump.php | |
working-directory: /tmp/test/thunder/install | |
- name: Setup Apache | |
uses: thunder/apache-shiva-php-action@v1 | |
with: | |
php-version: ${{ matrix.PHP_VERSION }} | |
site-directory: /tmp/test/thunder/install/docroot | |
http-port: ${{ env.DRUPAL_TESTING_HTTP_PORT }} | |
- name: Run tests suite | |
run: test-drupal-project run_tests | |
test-min: | |
runs-on: ubuntu-20.04 | |
services: | |
mysql: | |
image: mariadb:lts | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
chrome: | |
image: drupalci/chromedriver:production | |
options: --add-host=thunder-testing:host-gateway --name chrome | |
ports: | |
- 9515:9515 | |
strategy: | |
matrix: | |
PHP_VERSION: [ '8.1' ] | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'test-min') || github.event_name == 'schedule' }} | |
env: | |
DRUPAL_TESTING_TEST_GROUP: Thunder | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
php-version: ${{ matrix.PHP_VERSION }} | |
extensions: Imagick, gd, pdo_mysql | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.composer/cache | |
key: ${{ runner.os }}-composer-cache-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer-cache- | |
- name: Prepare fixtures | |
run: docker cp ./tests/fixtures chrome:/fixtures | |
- name: Add host | |
run: echo "127.0.0.1 thunder-testing" | sudo tee -a /etc/hosts | |
- name: Get build environment | |
run: | | |
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true --no-plugins | |
composer global require thunder/drupal-testing:${DRUPAL_TESTING_VERSION} | |
- name: Prepare the build | |
run: test-drupal-project prepare_build | |
- name: Install suggested dependencies | |
run: composer require "league/container:^4.2" "consolidation/config:^2.1.2" --no-update --no-progress --working-dir=/tmp/test/thunder/install | |
- name: Build the docroot | |
run: test-drupal-project build | |
env: | |
DRUPAL_TESTING_MIN_BUILD: true | |
- name: Setup Apache | |
uses: thunder/apache-shiva-php-action@v1 | |
with: | |
php-version: ${{ matrix.PHP_VERSION }} | |
site-directory: /tmp/test/thunder/install/docroot | |
http-port: ${{ env.DRUPAL_TESTING_HTTP_PORT }} | |
- name: Run the tests | |
run: test-drupal-project run_tests | |
# Start a debug session. | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 |