WordPress.org

Make WordPress Core

Ticket #48050: 48050.diff

File 48050.diff, 1.6 KB (added by kraftbj, 2 months ago)

First pass.

  • .env

    diff --git a/.env b/.env
    index 87d57d42da..b67e1e1620 100644
    a b LOCAL_WP_DEBUG_LOG=true 
    3030LOCAL_WP_DEBUG_DISPLAY=true
    3131LOCAL_SCRIPT_DEBUG=true
    3232
     33# To pre-install (not activate) plugins. False for none or comma-seperated liste.
     34INSTALL_PLUGINS=query-monitor
     35
    3336# The URL to use when running e2e tests.
    3437WP_BASE_URL=http://localhost:${LOCAL_PORT}
  • .travis.yml

    diff --git a/.travis.yml b/.travis.yml
    index a1ffd8aa23..a6b8e6cd1b 100644
    a b env: 
    2020    - COMPOSER_INSTALL: false
    2121    - NPM_INSTALL: true
    2222    - WP_INSTALL: true
     23    - INSTALL_PLUGINS: false
    2324
    2425matrix:
    2526  include:
  • tools/local-env/scripts/install.js

    diff --git a/tools/local-env/scripts/install.js b/tools/local-env/scripts/install.js
    index 29e982797c..99c84c6e5d 100644
    a b const dotenv = require( 'dotenv' ); 
    22const wait_on = require( 'wait-on' );
    33const { execSync } = require( 'child_process' );
    44const { renameSync, readFileSync, writeFileSync } = require( 'fs' );
     5var plugins;
    56
    67dotenv.config();
    78
    wait_on( { resources: [ `tcp:localhost:${process.env.LOCAL_PORT}`] } ) 
    3334        .then( () => {
    3435                wp_cli( 'db reset --yes' );
    3536                wp_cli( `core install --title="WordPress Develop" --admin_user=admin --admin_password=password --admin_email=test@test.com --skip-email --url=http://localhost:${process.env.LOCAL_PORT}` );
     37                if ( process.env.INSTALL_PLUGINS ) {
     38                        plugins = process.env.INSTALL_PLUGINS.split(',');
     39                        plugins.forEach( function( plugin ) {
     40                                wp_cli(`plugin install ${ plugin.trim() }`);
     41                        } );
     42                }
    3643        } );
    3744
    3845/**