Make WordPress Core


Ignore:
Timestamp:
05/04/2024 07:23:31 PM (23 months ago)
Author:
johnbillion
Message:

Bootstrap/Load: Add support for custom ports in multisite site addresses.

This allows a Multisite network to use an address that includes a port name, such as example.com:1234, and adds support for this to the local development environment too. You can now run a Multisite installation on the local development environment, for example at localhost:8889.

This also fixes some bugs with running a single site installation on a port, and updates the testing infrastructure so that the whole test suite runs both with and without a port number.

Props djzone, scribu, nacin, ipstenu, F J Kaiser, jeremyfelt, johnjamesjacoby, spacedmonkey, PerS, Clorith, Blackbam, enrico.sorcinelli, Jules Colle, obliviousharmony, desrosj, johnbillion

Fixes #21077, #52088

Location:
trunk/.github/workflows
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/phpunit-tests-run.yml

    r57918 r58097  
    4141        type: 'string'
    4242        default: 'phpunit.xml.dist'
     43      tests-domain:
     44        description: 'The domain to use for the tests'
     45        required: false
     46        type: 'string'
     47        default: 'example.org'
    4348      report:
    4449        description: 'Whether to report results to WordPress.org Hosting Tests'
     
    5156  LOCAL_DB_VERSION: ${{ inputs.db-version }}
    5257  LOCAL_PHP_MEMCACHED: ${{ inputs.memcached }}
     58  LOCAL_WP_TESTS_DOMAIN: ${{ inputs.tests-domain }}
    5359  PHPUNIT_CONFIG: ${{ inputs.phpunit-config }}
    5460  PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
     
    7581  # - Submit the test results to the WordPress.org host test results.
    7682  phpunit-tests:
    77     name: PHP ${{ inputs.php }} / ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }}
     83    name: PHP ${{ inputs.php }} / ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
    7884    runs-on: ${{ inputs.os }}
    7985    timeout-minutes: 20
  • trunk/.github/workflows/phpunit-tests.yml

    r57985 r58097  
    4949        db-type: [ 'mysql' ]
    5050        db-version: [ '5.7', '8.0', '8.1', '8.2', '8.3' ]
     51        tests-domain: [ 'example.org' ]
    5152        multisite: [ false, true ]
    5253        memcached: [ false ]
     
    5859            db-type: 'mysql'
    5960            db-version: '5.7'
     61            tests-domain: 'example.org'
    6062            multisite: false
    6163            memcached: true
     
    6466            db-type: 'mysql'
    6567            db-version: '5.7'
     68            tests-domain: 'example.org'
    6669            multisite: true
    6770            memcached: true
     71          # Include jobs with a port on the test domain for both single and multisite.
     72          - os: ubuntu-latest
     73            php: '7.4'
     74            db-type: 'mysql'
     75            db-version: '5.7'
     76            tests-domain: 'example.org:8889'
     77            multisite: false
     78            memcached: false
     79          - os: ubuntu-latest
     80            php: '7.4'
     81            db-type: 'mysql'
     82            db-version: '5.7'
     83            tests-domain: 'example.org:8889'
     84            multisite: true
     85            memcached: false
    6886          # Report test results to the Host Test Results.
    6987          - os: ubuntu-latest
     
    7189            db-type: 'mysql'
    7290            db-version: '5.7'
     91            tests-domain: 'example.org'
    7392            multisite: false
    7493            memcached: false
     
    82101      memcached: ${{ matrix.memcached }}
    83102      phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
     103      tests-domain: ${{ matrix.tests-domain }}
    84104      report: ${{ matrix.report || false }}
    85105
Note: See TracChangeset for help on using the changeset viewer.