Changeset 58302 for branches/6.2
- Timestamp:
- 06/03/2024 05:36:35 PM (4 months ago)
- Location:
- branches/6.2
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.2
- Property svn:mergeinfo changed
/trunk merged: 57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/6.2/.github/workflows/coding-standards.yml
r55487 r58302 41 41 cancel-in-progress: true 42 42 43 # Disable permissions for all available scopes by default. 44 # Any needed permissions should be configured at the job level. 45 permissions: {} 46 43 47 jobs: 44 48 # Runs PHP coding standards checks. 45 #46 # Violations are reported inline with annotations.47 #48 # Performs the following steps:49 # - Checks out the repository.50 # - Sets up PHP.51 # - Configures caching for PHPCS scans.52 # - Installs Composer dependencies.53 # - Make Composer packages available globally.54 # - Runs PHPCS on the full codebase with warnings suppressed.55 # - Generate a report for displaying issues as pull request annotations.56 # - Runs PHPCS on the `tests` directory without warnings suppressed.57 # - Generate a report for displaying `test` directory issues as pull request annotations.58 # - Ensures version-controlled files are not modified or deleted.59 49 phpcs: 60 50 name: PHP coding standards 61 runs-on: ubuntu-latest 62 timeout-minutes: 20 51 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk 52 permissions: 53 contents: read 63 54 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 64 65 steps: 66 - name: Checkout repository 67 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 68 69 - name: Set up PHP 70 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 71 with: 72 php-version: '7.4' 73 coverage: none 74 tools: cs2pr 75 76 # This date is used to ensure that the PHPCS cache is cleared at least once every week. 77 # http://man7.org/linux/man-pages/man1/date.1.html 78 - name: "Get last Monday's date" 79 id: get-date 80 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT 81 82 - name: Cache PHPCS scan cache 83 uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6 84 with: 85 path: | 86 .cache/phpcs-src.json 87 .cache/phpcs-tests.json 88 key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }} 89 90 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 91 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 92 - name: Install Composer dependencies 93 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 94 with: 95 custom-cache-suffix: ${{ steps.get-date.outputs.date }} 96 97 - name: Make Composer packages available globally 98 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 99 100 - name: Run PHPCS on all Core files 101 id: phpcs-core 102 run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml 103 104 - name: Show PHPCS results in PR 105 if: ${{ always() && steps.phpcs-core.outcome == 'failure' }} 106 run: cs2pr ./.cache/phpcs-report.xml 107 108 - name: Check test suite files for warnings 109 id: phpcs-tests 110 run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml 111 112 - name: Show test suite scan results in PR 113 if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }} 114 run: cs2pr ./.cache/phpcs-tests-report.xml 115 116 - name: Ensure version-controlled files are not modified during the tests 117 run: git diff --exit-code 55 with: 56 php-version: '7.4' 118 57 119 58 # Runs the JavaScript coding standards checks. 120 #121 # JSHint violations are not currently reported inline with annotations.122 #123 # Performs the following steps:124 # - Checks out the repository.125 # - Sets up Node.js.126 # - Logs debug information about the GitHub Action runner.127 # - Installs npm dependencies.128 # - Run the WordPress JSHint checks.129 # - Ensures version-controlled files are not modified or deleted.130 59 jshint: 131 60 name: JavaScript coding standards 132 runs-on: ubuntu-latest 133 timeout-minutes: 20 61 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk 62 permissions: 63 contents: read 134 64 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 135 env:136 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}137 138 steps:139 - name: Checkout repository140 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0141 142 - name: Set up Node.js143 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0144 with:145 node-version-file: '.nvmrc'146 cache: npm147 148 - name: Log debug information149 run: |150 npm --version151 node --version152 git --version153 svn --version154 155 - name: Install npm Dependencies156 run: npm ci157 158 - name: Run JSHint159 run: npm run grunt jshint160 161 - name: Ensure version-controlled files are not modified or deleted162 run: git diff --exit-code163 65 164 66 slack-notifications: 165 67 name: Slack Notifications 166 68 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 69 permissions: 70 actions: read 71 contents: read 167 72 needs: [ phpcs, jshint ] 168 73 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} … … 178 83 name: Failed workflow tasks 179 84 runs-on: ubuntu-latest 85 permissions: 86 actions: write 180 87 needs: [ phpcs, jshint, slack-notifications ] 181 88 if: | -
branches/6.2/.github/workflows/end-to-end-tests.yml
r55152 r58302 27 27 cancel-in-progress: true 28 28 29 # Disable permissions for all available scopes by default. 30 # Any needed permissions should be configured at the job level. 31 permissions: {} 32 29 33 env: 30 34 LOCAL_DIR: build … … 32 36 jobs: 33 37 # Runs the end-to-end test suite. 34 #35 # Performs the following steps:36 # - Sets environment variables.37 # - Checks out the repository.38 # - Sets up Node.js.39 # - Logs debug information about the GitHub Action runner.40 # - Installs npm dependencies.41 # - Builds WordPress to run from the `build` directory.42 # - Starts the WordPress Docker container.43 # - Logs the running Docker containers.44 # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).45 # - Install WordPress within the Docker container.46 # - Run the E2E tests.47 # - Ensures version-controlled files are not modified or deleted.48 38 e2e-tests: 49 name: E2E Tests 50 runs-on: ubuntu-latest 51 timeout-minutes: 20 39 name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }} 40 uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk 41 permissions: 42 contents: read 52 43 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 53 54 steps: 55 - name: Configure environment variables 56 run: | 57 echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV 58 echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV 59 60 - name: Checkout repository 61 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 62 63 - name: Set up Node.js 64 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 65 with: 66 node-version-file: '.nvmrc' 67 cache: npm 68 69 - name: Log debug information 70 run: | 71 npm --version 72 node --version 73 curl --version 74 git --version 75 svn --version 76 locale -a 77 78 - name: Install npm Dependencies 79 run: npm ci 80 81 - name: Build WordPress 82 run: npm run build 83 84 - name: Start Docker environment 85 run: | 86 npm run env:start 87 88 - name: Log running Docker containers 89 run: docker ps -a 90 91 - name: Docker debug information 92 run: | 93 docker -v 94 docker-compose -v 95 docker-compose run --rm mysql mysql --version 96 docker-compose run --rm php php --version 97 docker-compose run --rm php php -m 98 docker-compose run --rm php php -i 99 docker-compose run --rm php locale -a 100 101 - name: Install WordPress 102 run: npm run env:install 103 104 - name: Run E2E tests 105 run: npm run test:e2e 106 107 - name: Ensure version-controlled files are not modified or deleted 108 run: git diff --exit-code 109 110 slack-notifications: 111 name: Slack Notifications 112 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 113 needs: [ e2e-tests ] 114 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 44 strategy: 45 fail-fast: false 46 matrix: 47 LOCAL_SCRIPT_DEBUG: [ true, false ] 115 48 with: 116 calling_status: ${{ needs.e2e-tests.result == 'success' && 'success' || needs.e2e-tests.result == 'cancelled' && 'cancelled' || 'failure' }} 117 secrets: 118 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} 119 SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} 120 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 121 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 49 LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }} 50 install-gutenberg: false 122 51 123 52 failed-workflow: 124 53 name: Failed workflow tasks 125 54 runs-on: ubuntu-latest 126 needs: [ e2e-tests, slack-notifications ] 55 permissions: 56 actions: write 57 needs: [ e2e-tests ] 127 58 if: | 128 59 always() && … … 133 64 needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure' 134 65 ) 135 136 66 steps: 137 67 - name: Dispatch workflow run -
branches/6.2/.github/workflows/javascript-tests.yml
r55152 r58302 39 39 cancel-in-progress: true 40 40 41 # Disable permissions for all available scopes by default. 42 # Any needed permissions should be configured at the job level. 43 permissions: {} 44 41 45 jobs: 42 46 # Runs the QUnit tests for WordPress. 43 #44 # Performs the following steps:45 # - Checks out the repository.46 # - Sets up Node.js.47 # - Logs debug information about the GitHub Action runner.48 # - Installs npm dependencies.49 # - Run the WordPress QUnit tests.50 # - Ensures version-controlled files are not modified or deleted.51 47 test-js: 52 48 name: QUnit Tests 53 runs-on: ubuntu-latest 54 timeout-minutes: 20 49 uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk 50 permissions: 51 contents: read 55 52 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 56 57 steps:58 - name: Checkout repository59 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.060 61 - name: Set up Node.js62 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.063 with:64 node-version-file: '.nvmrc'65 cache: npm66 67 - name: Log debug information68 run: |69 npm --version70 node --version71 git --version72 svn --version73 74 - name: Install npm Dependencies75 run: npm ci76 77 - name: Run QUnit tests78 run: npm run grunt qunit:compiled79 80 - name: Ensure version-controlled files are not modified or deleted81 run: git diff --exit-code82 53 83 54 slack-notifications: 84 55 name: Slack Notifications 85 56 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 57 permissions: 58 actions: read 59 contents: read 86 60 needs: [ test-js ] 87 61 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} … … 97 71 name: Failed workflow tasks 98 72 runs-on: ubuntu-latest 73 permissions: 74 actions: write 99 75 needs: [ test-js, slack-notifications ] 100 76 if: | -
branches/6.2/.github/workflows/php-compatibility.yml
r55487 r58302 36 36 cancel-in-progress: true 37 37 38 # Disable permissions for all available scopes by default. 39 # Any needed permissions should be configured at the job level. 40 permissions: {} 41 38 42 jobs: 39 40 43 # Runs PHP compatibility testing. 41 #42 # Violations are reported inline with annotations.43 #44 # Performs the following steps:45 # - Checks out the repository.46 # - Sets up PHP.47 # - Logs debug information.48 # - Configures caching for PHP compatibility scans.49 # - Installs Composer dependencies.50 # - Make Composer packages available globally.51 # - Runs the PHP compatibility tests.52 # - Generate a report for displaying issues as pull request annotations.53 # - Ensures version-controlled files are not modified or deleted.54 44 php-compatibility: 55 45 name: Check PHP compatibility 56 runs-on: ubuntu-latest 57 timeout-minutes: 20 46 uses: WordPress/wordpress-develop/.github/workflows/reusable-php-compatibility.yml@trunk 47 permissions: 48 contents: read 58 49 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 59 60 steps: 61 - name: Checkout repository 62 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 63 64 - name: Set up PHP 65 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 66 with: 67 php-version: '7.4' 68 coverage: none 69 tools: cs2pr 70 71 - name: Log debug information 72 run: | 73 composer --version 74 75 # This date is used to ensure that the PHP compatibility cache is cleared at least once every week. 76 # http://man7.org/linux/man-pages/man1/date.1.html 77 - name: "Get last Monday's date" 78 id: get-date 79 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT 80 81 - name: Cache PHP compatibility scan cache 82 uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6 83 with: 84 path: .cache/phpcompat.json 85 key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }} 86 87 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 88 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 89 - name: Install Composer dependencies 90 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 91 with: 92 custom-cache-suffix: ${{ steps.get-date.outputs.date }} 93 94 - name: Make Composer packages available globally 95 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 96 97 - name: Run PHP compatibility tests 98 id: phpcs 99 run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml 100 101 - name: Show PHPCompatibility results in PR 102 if: ${{ always() && steps.phpcs.outcome == 'failure' }} 103 run: cs2pr ./.cache/phpcs-compat-report.xml 104 105 - name: Ensure version-controlled files are not modified or deleted 106 run: git diff --exit-code 50 with: 51 php-version: '7.4' 107 52 108 53 slack-notifications: 109 54 name: Slack Notifications 110 55 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 56 permissions: 57 actions: read 58 contents: read 111 59 needs: [ php-compatibility ] 112 60 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} … … 122 70 name: Failed workflow tasks 123 71 runs-on: ubuntu-latest 72 permissions: 73 actions: write 124 74 needs: [ php-compatibility, slack-notifications ] 125 75 if: | -
branches/6.2/.github/workflows/phpunit-tests.yml
r55487 r58302 27 27 cancel-in-progress: true 28 28 29 env: 30 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} 31 LOCAL_PHP_MEMCACHED: ${{ false }}32 SLOW_TESTS: 'external-http,media,restapi' 29 # Disable permissions for all available scopes by default. 30 # Any needed permissions should be configured at the job level. 31 permissions: {} 32 33 33 34 34 jobs: 35 # Runs the PHPUnit tests for WordPress.36 35 # 37 # Performs the following steps: 38 # - Sets environment variables. 39 # - Checks out the repository. 40 # - Sets up Node.js. 41 # - Sets up PHP. 42 # - Installs Composer dependencies. 43 # - Installs npm dependencies 44 # - Logs general debug information about the runner. 45 # - Logs Docker debug information (about the Docker installation within the runner). 46 # - Starts the WordPress Docker container. 47 # - Logs the running Docker containers. 48 # - Logs debug information about what's installed within the WordPress Docker containers. 49 # - Install WordPress within the Docker container. 50 # - Run the PHPUnit tests. 51 # - Ensures version-controlled files are not modified or deleted. 52 # - Checks out the WordPress Test reporter repository. 53 # - Submit the test results to the WordPress.org host test results. 36 # Creates a PHPUnit test job for each PHP/MySQL combination. 37 # 54 38 test-php: 55 name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} 56 runs-on: ${{ matrix.os }} 57 timeout-minutes: 20 39 name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} 40 uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests.yml@trunk 41 permissions: 42 contents: read 43 secrets: inherit 58 44 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 59 45 strategy: 60 46 fail-fast: false 61 47 matrix: 48 os: [ ubuntu-latest ] 62 49 php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] 63 os: [ ubuntu-latest ] 50 db-type: [ 'mysql' ] 51 db-version: [ '5.7' ] 52 multisite: [ false, true ] 64 53 memcached: [ false ] 65 split_slow: [ false ] 66 multisite: [ false, true ] 54 67 55 include: 68 # Additional "slow" jobs for PHP 5.6. 69 - php: '5.6' 70 os: ubuntu-latest 56 # Include jobs for PHP 7.4 with memcached. 57 - os: ubuntu-latest 58 php: '7.4' 59 db-type: 'mysql' 60 db-version: '5.7' 61 multisite: false 62 memcached: true 63 - os: ubuntu-latest 64 php: '7.4' 65 db-type: 'mysql' 66 db-version: '5.7' 67 multisite: true 68 memcached: true 69 # Report the results of the PHP 7.4 without memcached job. 70 - os: ubuntu-latest 71 php: '7.4' 72 db-type: 'mysql' 73 db-version: '5.7' 74 multisite: false 71 75 memcached: false 72 multisite: false73 split_slow: true74 - php: '5.6'75 os: ubuntu-latest76 memcached: false77 multisite: true78 split_slow: true79 # Include jobs for PHP 7.4 with memcached.80 - php: '7.4'81 os: ubuntu-latest82 memcached: true83 multisite: false84 - php: '7.4'85 os: ubuntu-latest86 memcached: true87 multisite: true88 # Report the results of the PHP 7.4 without memcached job.89 - php: '7.4'90 os: ubuntu-latest91 memcached: false92 multisite: false93 76 report: true 94 95 env: 96 LOCAL_PHP: ${{ matrix.php }}-fpm 97 LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }} 98 PHPUNIT_CONFIG: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} 99 100 steps: 101 - name: Configure environment variables 102 run: | 103 echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV 104 echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV 105 106 - name: Checkout repository 107 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 108 109 - name: Set up Node.js 110 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 111 with: 112 node-version-file: '.nvmrc' 113 cache: npm 114 115 ## 116 # This allows Composer dependencies to be installed using a single step. 117 # 118 # Since the tests are currently run within the Docker containers where the PHP version varies, 119 # the same PHP version needs to be configured for the action runner machine so that the correct 120 # dependency versions are installed and cached. 121 ## 122 - name: Set up PHP 123 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 124 with: 125 php-version: '${{ matrix.php }}' 126 coverage: none 127 128 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 129 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 130 - name: Install Composer dependencies 131 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 132 with: 133 custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") 134 135 - name: Install npm dependencies 136 run: npm ci 137 138 - name: General debug information 139 run: | 140 npm --version 141 node --version 142 curl --version 143 git --version 144 svn --version 145 composer --version 146 locale -a 147 148 - name: Docker debug information 149 run: | 150 docker -v 151 docker-compose -v 152 153 - name: Start Docker environment 154 run: | 155 npm run env:start 156 157 - name: Log running Docker containers 158 run: docker ps -a 159 160 - name: WordPress Docker container debug information 161 run: | 162 docker-compose run --rm mysql mysql --version 163 docker-compose run --rm php php --version 164 docker-compose run --rm php php -m 165 docker-compose run --rm php php -i 166 docker-compose run --rm php locale -a 167 168 - name: Install WordPress 169 run: npm run env:install 170 171 - name: Run slow PHPUnit tests 172 if: ${{ matrix.split_slow }} 173 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }} 174 175 - name: Run PHPUnit tests for single site excluding slow tests 176 if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }} 177 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required 178 179 - name: Run PHPUnit tests for Multisite excluding slow tests 180 if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }} 181 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers 182 183 - name: Run PHPUnit tests 184 if: ${{ matrix.php >= '7.0' }} 185 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} 186 187 - name: Run AJAX tests 188 if: ${{ ! matrix.split_slow }} 189 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax 190 191 - name: Run ms-files tests as a multisite install 192 if: ${{ matrix.multisite && ! matrix.split_slow }} 193 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c tests/phpunit/multisite.xml --group ms-files 194 195 - name: Run external HTTP tests 196 if: ${{ ! matrix.multisite && ! matrix.split_slow }} 197 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c phpunit.xml.dist --group external-http 198 199 # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist. 200 - name: Run (Xdebug) tests 201 if: ${{ ! matrix.split_slow }} 202 run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__ 203 204 - name: Ensure version-controlled files are not modified or deleted 205 run: git diff --exit-code 206 207 - name: Checkout the WordPress Test Reporter 208 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} 209 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 210 with: 211 repository: 'WordPress/phpunit-test-runner' 212 path: 'test-runner' 213 214 - name: Submit test results to the WordPress.org host test results 215 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} 216 env: 217 WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}" 218 run: docker-compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php 77 with: 78 os: ${{ matrix.os }} 79 php: ${{ matrix.php }} 80 db-type: ${{ matrix.db-type }} 81 db-version: ${{ matrix.db-version }} 82 multisite: ${{ matrix.multisite }} 83 memcached: ${{ matrix.memcached }} 84 phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} 85 report: ${{ matrix.report || false }} 219 86 220 87 slack-notifications: 221 88 name: Slack Notifications 222 89 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 90 permissions: 91 actions: read 92 contents: read 223 93 needs: [ test-php ] 224 94 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} … … 234 104 name: Failed workflow tasks 235 105 runs-on: ubuntu-latest 106 permissions: 107 actions: write 236 108 needs: [ test-php, slack-notifications ] 237 109 if: | -
branches/6.2/docker-compose.yml
r54096 r58302 1 version: '3.7'2 3 1 services: 4 2 … … 26 24 27 25 depends_on: 28 - php 26 php: 27 condition: service_started 28 mysql: 29 condition: service_healthy 29 30 30 31 ## … … 53 54 command: /bin/sh -c "if [ $LOCAL_PHP_MEMCACHED = true ]; then cp -n /var/www/tests/phpunit/includes/object-cache.php /var/www/src/wp-content/object-cache.php; else rm -f /var/www/src/wp-content/object-cache.php; fi && exec php-fpm" 54 55 55 depends_on:56 - mysql57 58 56 # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly. 59 57 init: true … … 66 64 ## 67 65 mysql: 68 image: amd64/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} 66 image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} 67 platform: linux/amd64 69 68 70 69 networks: … … 83 82 # For compatibility with PHP versions that don't support the caching_sha2_password auth plugin used in MySQL 8.0. 84 83 command: --default-authentication-plugin=mysql_native_password 84 85 healthcheck: 86 test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ] 87 timeout: 5s 88 interval: 5s 89 retries: 10 85 90 86 91 ## … … 108 113 - localhost:host-gateway 109 114 115 depends_on: 116 php: 117 condition: service_started 118 mysql: 119 condition: service_healthy 120 110 121 ## 111 122 # The Memcached container. … … 120 131 - 11211:11211 121 132 133 depends_on: 134 php: 135 condition: service_started 136 122 137 volumes: 123 138 # So that sites aren't wiped every time containers are restarted, MySQL uses a persistent volume. -
branches/6.2/tools/local-env/scripts/docker.js
r54096 r58302 5 5 dotenvExpand.expand( dotenv.config() ); 6 6 7 // Execute any docker -compose command passed to this script.8 execSync( 'docker -compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );7 // Execute any docker compose command passed to this script. 8 execSync( 'docker compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } ); -
branches/6.2/tools/local-env/scripts/install.js
r54096 r58302 46 46 */ 47 47 function wp_cli( cmd ) { 48 execSync( `docker -compose run --rm cli ${cmd}`, { stdio: 'inherit' } );48 execSync( `docker compose run --rm cli ${cmd}`, { stdio: 'inherit' } ); 49 49 } 50 50 … … 55 55 const testPluginDirectory = 'tests/phpunit/data/plugins/wordpress-importer'; 56 56 57 execSync( `docker -compose exec -T php rm -rf ${testPluginDirectory}`, { stdio: 'inherit' } );58 execSync( `docker -compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1`, { stdio: 'inherit' } );57 execSync( `docker compose exec -T php rm -rf ${testPluginDirectory}`, { stdio: 'inherit' } ); 58 execSync( `docker compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1`, { stdio: 'inherit' } ); 59 59 } -
branches/6.2/tools/local-env/scripts/start.js
r55473 r58302 20 20 ? 'wordpress-develop memcached' 21 21 : 'wordpress-develop'; 22 execSync( `docker -compose up -d ${containers}`, { stdio: 'inherit' } );22 execSync( `docker compose up -d ${containers}`, { stdio: 'inherit' } ); 23 23 24 24 // If Docker Toolbox is being used, we need to manually forward LOCAL_PORT to the Docker VM.
Note: See TracChangeset
for help on using the changeset viewer.