WordPress.org

Make WordPress Core

Changeset 50313


Ignore:
Timestamp:
02/12/2021 08:00:11 PM (8 months ago)
Author:
desrosj
Message:

Build/Test Tools: Restore automated testing in the 4.5 branch.

This commit merges the workflow files required to run automated testing on GitHub Actions.

In addition, [49836] and [50285] have been included in order to keep the local Docker environment consistent across all branches.

Merges [49162,49168-49169,49175,49204,49227-49228,49244,49369,49371,49548,49781-49784,49786,49836,49938,50268,50285,50298] to the 4.5 branch.
See #50401.

Location:
branches/4.5
Files:
9 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/4.5

  • branches/4.5/.env

    r50243 r50313  
    4646LOCAL_PHP_MEMCACHED=false
    4747
    48 # The MySQL version to use. See https://hub.docker.com/_/mysql/ for valid versions.
    49 LOCAL_MYSQL=5.7
     48##
     49# The database software to use.
     50#
     51# Supported values are `mysql` and `mariadb`.
     52##
     53LOCAL_DB_TYPE=mysql
     54
     55##
     56# The database version to use.
     57#
     58# Defaults to 5.7 with the assumption that LOCAL_DB_TYPE is set to `mysql` above.
     59#
     60# When using `mysql`, see https://hub.docker.com/_/mysql/ for valid versions.
     61# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions.
     62##
     63LOCAL_DB_VERSION=5.7
    5064
    5165# The debug settings to add to `wp-config.php`.
     
    5872# The URL to use when running e2e tests.
    5973WP_BASE_URL=http://localhost:${LOCAL_PORT}
     74
     75##
     76# The revision number of the WordPress Importer plugin to use when running unit tests.
     77#
     78# This should be an SVN revision number from the official plugin repository on wordpress.org.
     79##
     80WP_IMPORTER_REVISION=2387243
  • branches/4.5/docker-compose.yml

    r50243 r50313  
    5454  ##
    5555  mysql:
    56     image: mysql:${LOCAL_MYSQL-5.7}
     56    image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-5.7}
    5757
    5858    networks:
  • branches/4.5/tools/local-env/scripts/install.js

    r50243 r50313  
    2020// Move wp-config.php to the base directory, so it doesn't get mixed up in the src or build directories.
    2121renameSync( 'src/wp-config.php', 'wp-config.php' );
     22
     23install_wp_importer();
    2224
    2325// Read in wp-tests-config-sample.php, edit it to work with our config, then write it to wp-tests-config.php.
     
    4648    execSync( `docker-compose run --rm cli ${cmd}`, { stdio: 'inherit' } );
    4749}
     50
     51/**
     52 * Downloads the WordPress Importer plugin for use in tests.
     53 */
     54function install_wp_importer() {
     55    const test_plugin_directory = 'tests/phpunit/data/plugins/wordpress-importer';
     56
     57    execSync( `docker-compose exec -T php rm -rf ${test_plugin_directory} && svn checkout -r ${process.env.WP_IMPORTER_REVISION} https://plugins.svn.wordpress.org/wordpress-importer/trunk/ ${test_plugin_directory}`, { stdio: 'inherit' } );
     58}
Note: See TracChangeset for help on using the changeset viewer.