Changeset 58611 for branches/5.4
- Timestamp:
- 07/01/2024 07:17:07 PM (5 months ago)
- Location:
- branches/5.4
- Files:
-
- 2 added
- 1 deleted
- 12 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/5.4
- Property svn:mergeinfo changed
/trunk merged: 49264,51673,52179,53552,53895,56464,57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/5.4/.github/workflows/coding-standards.yml
r55521 r58611 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 # - Logs debug information.52 # - Installs Composer dependencies (use cache if possible).53 # - Make Composer packages available globally.54 # - Logs PHP_CodeSniffer debug information.55 # - Runs PHPCS on the full codebase with warnings suppressed.56 # - Runs PHPCS on the `tests` directory without warnings suppressed.57 49 phpcs: 58 50 name: PHP coding standards 59 runs-on: ubuntu-latest 60 timeout-minutes: 20 51 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk 52 permissions: 53 contents: read 61 54 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 62 63 steps: 64 - name: Checkout repository 65 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 66 67 - name: Set up PHP 68 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 69 with: 70 php-version: '7.3' 71 coverage: none 72 tools: composer, cs2pr 73 74 - name: Log debug information 75 run: | 76 php --version 77 composer --version 78 79 - name: Install Composer dependencies 80 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 81 with: 82 composer-options: "--no-progress --no-ansi" 83 84 - name: Make Composer packages available globally 85 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 86 87 - name: Log PHPCS debug information 88 run: phpcs -i 89 90 - name: Run PHPCBF on all Core files 91 run: phpcbf 92 93 - name: Run PHPCS on all Core files 94 run: phpcs -q -n --report=checkstyle | cs2pr 95 96 - name: Check test suite files for warnings 97 run: phpcs tests -q --report=checkstyle | cs2pr 55 with: 56 php-version: '7.3' 98 57 99 58 # Runs the JavaScript coding standards checks. 100 #101 # JSHint violations are not currently reported inline with annotations.102 #103 # Performs the following steps:104 # - Checks out the repository.105 # - Logs debug information about the GitHub Action runner.106 # - Installs Node.js.107 # - Logs updated debug information.108 # _ Installs npm dependencies.109 # - Run the WordPress JSHint checks.110 59 jshint: 111 60 name: JavaScript coding standards 112 runs-on: ubuntu-latest 113 timeout-minutes: 20 61 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk 62 permissions: 63 contents: read 114 64 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 115 env:116 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}117 118 steps:119 - name: Checkout repository120 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0121 122 - name: Log debug information123 run: |124 npm --version125 node --version126 git --version127 svn --version128 129 - name: Install Node.js130 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0131 with:132 node-version-file: '.nvmrc'133 cache: npm134 135 - name: Log debug information136 run: |137 npm --version138 node --version139 140 - name: Install Dependencies141 run: npm ci142 143 - name: Run JSHint144 run: npm run grunt jshint145 65 146 66 slack-notifications: 147 67 name: Slack Notifications 148 68 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 69 permissions: 70 actions: read 71 contents: read 149 72 needs: [ phpcs, jshint ] 150 73 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} … … 160 83 name: Failed workflow tasks 161 84 runs-on: ubuntu-latest 85 permissions: 86 actions: write 162 87 needs: [ phpcs, jshint, slack-notifications ] 163 88 if: | … … 173 98 steps: 174 99 - name: Dispatch workflow run 175 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.0100 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 176 101 with: 177 102 retries: 2 -
branches/5.4/.github/workflows/javascript-tests.yml
r55521 r58611 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 # - Logs debug information about the GitHub Action runner.47 # - Installs Node.js.48 # - Logs updated debug information.49 # _ Installs npm dependencies.50 # - Run the WordPress QUnit tests.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: Log debug information62 run: |63 npm --version64 node --version65 git --version66 svn --version67 68 - name: Set up Node.js69 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.070 with:71 node-version-file: '.nvmrc'72 cache: npm73 74 - name: Log debug information75 run: |76 npm --version77 node --version78 79 - name: Install Dependencies80 run: npm ci81 82 - name: Run QUnit tests83 run: npm run grunt qunit:compiled84 53 85 54 slack-notifications: 86 55 name: Slack Notifications 87 56 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 57 permissions: 58 actions: read 59 contents: read 88 60 needs: [ test-js ] 89 61 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} … … 99 71 name: Failed workflow tasks 100 72 runs-on: ubuntu-latest 73 permissions: 74 actions: write 101 75 needs: [ test-js, slack-notifications ] 102 76 if: | … … 111 85 steps: 112 86 - name: Dispatch workflow run 113 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.087 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 114 88 with: 115 89 retries: 2 -
branches/5.4/.github/workflows/phpunit-tests.yml
r55521 r58611 27 27 cancel-in-progress: true 28 28 29 env: 30 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} 31 # Controls which npm script to use for running PHPUnit tests. Options ar `php` and `php-composer`. 32 PHPUNIT_SCRIPT: php 33 LOCAL_PHP_MEMCACHED: ${{ false }} 34 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: {} 35 32 36 33 jobs: 37 # Runs the PHPUnit tests for WordPress. 38 # 39 # Performs the following steps: 40 # - Sets environment variables. 41 # - Sets up the environment variables needed for testing with memcached (if desired). 42 # - Installs Node.js. 43 # - Installs npm dependencies 44 # - Configures caching for Composer. 45 # - Installs Composer dependencies. 46 # - Logs Docker debug information (about the Docker installation within the runner). 47 # - Starts the WordPress Docker container. 48 # - Starts the Memcached server after the Docker network has been created (if desired). 49 # - Logs general debug information about the runner. 50 # - Logs the running Docker containers. 51 # - Logs debug information from inside the WordPress Docker container. 52 # - Logs debug information about what's installed within the WordPress Docker containers. 53 # - Install WordPress within the Docker container. 54 # - Run the PHPUnit tests. 55 # - Checks out the WordPress Test reporter repository. 56 # - Reconnect the directory to the Git repository. 57 # - Submit the test results to the WordPress.org host test results. 34 # Creates PHPUnit test jobs. 58 35 test-php: 59 name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} 60 runs-on: ${{ matrix.os }} 61 timeout-minutes: 20 36 name: PHP ${{ matrix.php }} 37 uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v2.yml@trunk 38 permissions: 39 contents: read 40 secrets: inherit 62 41 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 63 42 strategy: 64 43 fail-fast: false 65 44 matrix: 45 os: [ ubuntu-latest ] 66 46 php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4' ] 67 os: [ ubuntu-latest ] 47 multisite: [ false, true ] 48 split_slow: [ false ] 68 49 memcached: [ false ] 69 split_slow: [ false ]70 multisite: [ false, true ]71 50 include: 72 51 # Additional "slow" jobs for PHP 5.6. 73 - php: '5.6 .20'52 - php: '5.6' 74 53 os: ubuntu-latest 75 54 memcached: false 76 55 multisite: false 77 56 split_slow: true 78 - php: '5.6 .20'57 - php: '5.6' 79 58 os: ubuntu-latest 80 59 memcached: false … … 86 65 memcached: true 87 66 multisite: false 67 split_slow: false 88 68 - php: '7.4' 89 69 os: ubuntu-latest 90 70 memcached: true 91 71 multisite: true 92 # Report the results of the PHP 7.4 without memcached job. 93 - php: '7.4' 94 os: ubuntu-latest 95 memcached: false 96 multisite: false 97 report: true 98 env: 99 LOCAL_PHP: ${{ matrix.php }}-fpm 100 LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }} 101 PHPUNIT_CONFIG: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} 102 103 steps: 104 - name: Configure environment variables 105 run: | 106 echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV 107 echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV 108 109 - name: Checkout repository 110 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 111 112 - name: Install Node.js 113 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 114 with: 115 node-version-file: '.nvmrc' 116 cache: npm 117 118 119 - name: Install npm dependencies 120 run: npm ci 121 122 - name: Get Composer cache directory 123 id: composer-cache 124 run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT 125 126 - name: Cache Composer dependencies 127 uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3.2.3 128 env: 129 cache-name: cache-composer-dependencies 130 with: 131 path: ${{ steps.composer-cache.outputs.composer_dir }} 132 key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} 133 134 - name: Install Composer dependencies 135 run: | 136 if [ ${{ env.LOCAL_PHP }} == '7.1-fpm' ]; then 137 docker-compose run --rm php composer update 138 git checkout -- composer.lock 139 elif [[ ${{ env.LOCAL_PHP }} == '5.6.20-fpm' || ${{ env.LOCAL_PHP }} == '5.6-fpm' || ${{ env.LOCAL_PHP }} == '7.0-fpm' ]]; then 140 docker-compose run --rm php composer require --dev phpunit/phpunit:"^5.7" --update-with-dependencies 141 git checkout -- composer.lock composer.json 142 else 143 docker-compose run --rm php composer install 144 fi 145 146 - name: Docker debug information 147 run: | 148 docker -v 149 docker-compose -v 150 151 - name: Start Docker environment 152 run: | 153 npm run env:start 154 155 # The memcached server needs to start after the Docker network has been set up with `npm run env:start`. 156 - name: Start the Memcached server. 157 if: ${{ matrix.memcached }} 158 run: | 159 cp tests/phpunit/includes/object-cache.php src/wp-content/object-cache.php 160 docker run --name memcached --net $(basename "$PWD")_wpdevnet -d memcached 161 162 - name: General debug information 163 run: | 164 npm --version 165 node --version 166 curl --version 167 git --version 168 svn --version 169 170 - name: Log running Docker containers 171 run: docker ps -a 172 173 - name: WordPress Docker container debug information 174 run: | 175 docker-compose run --rm mysql mysql --version 176 docker-compose run --rm php php --version 177 docker-compose run --rm php php -m 178 docker-compose run --rm php php -i 179 docker-compose run --rm php locale -a 180 181 - name: Install WordPress 182 run: npm run env:install 183 184 - name: Run slow PHPUnit tests 185 if: ${{ matrix.split_slow }} 186 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }} 187 188 - name: Run PHPUnit tests for single site excluding slow tests 189 if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }} 190 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required 191 192 - name: Run PHPUnit tests for Multisite excluding slow tests 193 if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }} 194 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers 195 196 - name: Run PHPUnit tests 197 if: ${{ matrix.php >= '7.0' }} 198 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} 199 200 - name: Run AJAX tests 201 if: ${{ ! matrix.split_slow && ! matrix.multisite }} 202 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax 203 204 - name: Run ms-files tests as a multisite install 205 if: ${{ matrix.multisite && ! matrix.split_slow }} 206 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --group ms-files 207 208 - name: Run external HTTP tests 209 if: ${{ ! matrix.multisite && ! matrix.split_slow }} 210 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group external-http 211 212 # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist. 213 - name: Run (xDebug) tests 214 if: ${{ ! matrix.split_slow }} 215 run: LOCAL_PHP_XDEBUG=true npm run test:${{ env.PHPUNIT_SCRIPT }} -- -v --group xdebug --exclude-group __fakegroup__ 216 217 - name: Checkout the WordPress Test Reporter 218 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} 219 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 220 with: 221 repository: 'WordPress/phpunit-test-runner' 222 path: 'test-runner' 223 224 - name: Submit test results to the WordPress.org host test results 225 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} 226 env: 227 WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}" 228 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 72 split_slow: false 73 with: 74 os: ${{ matrix.os }} 75 php: ${{ matrix.php }} 76 multisite: ${{ matrix.multisite }} 77 split_slow: ${{ matrix.split_slow }} 78 test_ajax: ${{ ! matrix.multisite }} 79 memcached: ${{ matrix.memcached }} 80 phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} 229 81 230 82 slack-notifications: 231 83 name: Slack Notifications 232 84 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 85 permissions: 86 actions: read 87 contents: read 233 88 needs: [ test-php ] 234 89 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 235 90 with: 236 calling_status: ${{ needs.test-php.result == 'success' && 'success' || needs.test-php.result == 'cancelled' && 'cancelled' || 'failure' }}91 calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} 237 92 secrets: 238 93 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} … … 244 99 name: Failed workflow tasks 245 100 runs-on: ubuntu-latest 246 needs: [ test-php, slack-notifications ] 101 permissions: 102 actions: write 103 needs: [ slack-notifications ] 247 104 if: | 248 105 always() && … … 251 108 github.run_attempt < 2 && 252 109 ( 253 needs.test-php.result == 'cancelled' || needs.test-php.result == 'failure' 110 contains( needs.*.result, 'cancelled' ) || 111 contains( needs.*.result, 'failure' ) 254 112 ) 255 113 256 114 steps: 257 115 - name: Dispatch workflow run 258 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.0116 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 259 117 with: 260 118 retries: 2 -
branches/5.4/.github/workflows/test-build-processes.yml
r58610 r58611 1 name: Test npm1 name: Test Build Processes 2 2 3 3 on: … … 34 34 cancel-in-progress: true 35 35 36 env: 37 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} 36 # Disable permissions for all available scopes by default. 37 # Any needed permissions should be configured at the job level. 38 permissions: {} 38 39 39 40 jobs: 40 # Verifies that installing npm dependencies and building WordPress works as expected. 41 # 42 # Performs the following steps: 43 # - Checks out the repository. 44 # - Logs debug information about the GitHub Action runner. 45 # - Installs Node.js. 46 # _ Installs npm dependencies. 47 # - Builds WordPress to run from the `build` directory. 48 # - Cleans up after building WordPress to the `build` directory. 49 # - Builds WordPress to run from the `src` directory. 50 # - Cleans up after building WordPress to the `src` directory. 51 test-npm: 52 name: Test npm on ${{ matrix.os }} 53 runs-on: ${{ matrix.os }} 54 timeout-minutes: 20 41 # Tests the WordPress Core build process on multiple operating systems. 42 test-core-build-process: 43 name: Core running from ${{ matrix.directory }} 44 uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk 45 permissions: 46 contents: read 55 47 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 56 48 strategy: … … 58 50 matrix: 59 51 os: [ ubuntu-latest, windows-latest ] 52 directory: [ 'src', 'build' ] 53 include: 54 # Only prepare artifacts once. 55 - os: ubuntu-latest 56 directory: 'build' 57 prepare-playground: true 58 with: 59 os: ${{ matrix.os }} 60 directory: ${{ matrix.directory }} 61 prepare-playground: ${{ matrix.prepare-playground && matrix.prepare-playground || false }} 62 test-emoji: false 60 63 61 steps: 62 - name: Checkout repository 63 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 64 65 - name: Log debug information 66 run: | 67 npm --version 68 node --version 69 curl --version 70 git --version 71 svn --version 72 73 - name: Install Node.js 74 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 75 with: 76 node-version-file: '.nvmrc' 77 cache: npm 78 79 - name: Install Dependencies 80 run: npm ci 81 82 - name: Build WordPress 83 run: npm run build 84 85 - name: Clean after building 86 run: npm run grunt clean 87 88 - name: Build WordPress in /src 89 run: npm run build:dev 90 91 - name: Clean after building in /src 92 run: npm run grunt clean -- --dev 93 94 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 64 # Tests the WordPress Core build process on MacOS. 95 65 # 96 # This is separate from the job above in order to use stricter conditions aboutwhen to run.66 # This is separate from the job above in order to use stricter conditions when determining when to run. 97 67 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 98 68 # … … 100 70 # currently no way to determine the OS being used on a given job. 101 71 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 102 # 103 # Performs the following steps: 104 # - Checks out the repository. 105 # - Logs debug information about the GitHub Action runner. 106 # - Installs Node.js. 107 # _ Installs npm dependencies. 108 # - Builds WordPress to run from the `build` directory. 109 # - Cleans up after building WordPress to the `build` directory. 110 # - Builds WordPress to run from the `src` directory. 111 # - Cleans up after building WordPress to the `src` directory. 112 test-npm-macos: 113 name: Test npm on MacOS 114 runs-on: macos-latest 115 timeout-minutes: 30 72 test-core-build-process-macos: 73 name: Core running from ${{ matrix.directory }} 74 uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk 75 permissions: 76 contents: read 116 77 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 117 steps: 118 - name: Checkout repository 119 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 120 121 - name: Log debug information 122 run: | 123 npm --version 124 node --version 125 curl --version 126 git --version 127 svn --version 128 129 - name: Install Node.js 130 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 131 with: 132 node-version-file: '.nvmrc' 133 cache: npm 134 135 - name: Install Dependencies 136 run: npm ci 137 138 - name: Build WordPress 139 run: npm run build 140 141 - name: Clean after building 142 run: npm run grunt clean 143 144 - name: Build WordPress in /src 145 run: npm run build:dev 146 147 - name: Clean after building in /src 148 run: npm run grunt clean -- --dev 78 strategy: 79 fail-fast: false 80 matrix: 81 os: [ macos-13 ] 82 directory: [ 'src', 'build' ] 83 with: 84 os: ${{ matrix.os }} 85 directory: ${{ matrix.directory }} 86 test-emoji: false 149 87 150 88 slack-notifications: 151 89 name: Slack Notifications 152 90 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 153 needs: [ test-npm, test-npm-macos ] 91 permissions: 92 actions: read 93 contents: read 94 needs: [ test-core-build-process, test-core-build-process-macos ] 154 95 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 155 96 with: 156 calling_status: ${{ needs.test-npm.result == 'success' && needs.test-npm-macos.result == 'success' && 'success' || ( needs.test-npm.result == 'cancelled' || needs.test-npm-macos.result == 'cancelled' ) && 'cancelled' || 'failure' }}97 calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} 157 98 secrets: 158 99 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} … … 164 105 name: Failed workflow tasks 165 106 runs-on: ubuntu-latest 166 needs: [ test-npm, test-npm-macos, slack-notifications ] 107 permissions: 108 actions: write 109 needs: [ slack-notifications ] 167 110 if: | 168 111 always() && … … 171 114 github.run_attempt < 2 && 172 115 ( 173 needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure'||174 needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure'116 contains( needs.*.result, 'cancelled' ) || 117 contains( needs.*.result, 'failure' ) 175 118 ) 176 119 177 120 steps: 178 121 - name: Dispatch workflow run 179 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.0122 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 180 123 with: 181 124 retries: 2 -
branches/5.4/.gitignore
r47352 r58611 10 10 /.phpcs.xml 11 11 /phpcs.xml 12 .cache/* 12 13 /tests/phpunit/data/plugins/wordpress-importer 13 14 /tests/phpunit/data/.trac-ticket-cache* -
branches/5.4/docker-compose.yml
r55521 r58611 1 version: '3.7'2 3 1 services: 4 2 … … 22 20 - ./:/var/www 23 21 24 # Load our config file, substitu ning environment variables into the config.22 # Load our config file, substituting environment variables into the config. 25 23 command: /bin/sh -c "envsubst '$$LOCAL_DIR' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'" 26 24 27 25 depends_on: 28 - php 26 php: 27 condition: service_started 28 mysql: 29 condition: service_healthy 29 30 30 31 ## … … 38 39 39 40 environment: 40 LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false} 41 LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false} 42 PHP_FPM_UID: ${PHP_FPM_UID-1000} 43 PHP_FPM_GID: ${PHP_FPM_GID-1000} 41 - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false} 42 - XDEBUG_MODE=${LOCAL_PHP_XDEBUG_MODE-develop,debug} 43 - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false} 44 - PHP_FPM_UID=${PHP_FPM_UID-1000} 45 - PHP_FPM_GID=${PHP_FPM_GID-1000} 46 - GITHUB_REF=${GITHUB_REF-false} 47 - GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME-false} 44 48 45 49 volumes: … … 47 51 - ./:/var/www 48 52 49 depends_on: 50 - mysql 53 # Copy or delete the Memcached dropin plugin file as appropriate. 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" 55 56 # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly. 57 init: true 58 59 extra_hosts: 60 - localhost:host-gateway 51 61 52 62 ## … … 54 64 ## 55 65 mysql: 56 image: amd64/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} 66 image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} 67 platform: linux/amd64 57 68 58 69 networks: … … 72 83 command: --default-authentication-plugin=mysql_native_password 73 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 90 74 91 ## 75 92 # The WP CLI container. … … 82 99 83 100 environment: 84 LOCAL_PHP_XDEBUG:${LOCAL_PHP_XDEBUG-false}85 LOCAL_PHP_MEMCACHED:${LOCAL_PHP_MEMCACHED-false}86 PHP_FPM_UID:${PHP_FPM_UID-1000}87 PHP_FPM_GID:${PHP_FPM_GID-1000}101 - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false} 102 - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false} 103 - PHP_FPM_UID=${PHP_FPM_UID-1000} 104 - PHP_FPM_GID=${PHP_FPM_GID-1000} 88 105 89 106 volumes: … … 92 109 # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly. 93 110 init: true 111 112 extra_hosts: 113 - localhost:host-gateway 114 115 depends_on: 116 php: 117 condition: service_started 118 mysql: 119 condition: service_healthy 94 120 95 121 ## … … 103 129 104 130 environment: 105 LOCAL_PHP_XDEBUG:${LOCAL_PHP_XDEBUG-false}106 LOCAL_PHP_MEMCACHED:${LOCAL_PHP_MEMCACHED-false}107 LOCAL_DIR: ${LOCAL_DIR-src}108 WP_MULTISITE: ${WP_MULTISITE-false}109 PHP_FPM_UID: ${PHP_FPM_UID-1000}110 PHP_FPM_GID: ${PHP_FPM_GID-1000}111 TRAVIS_BRANCH: ${TRAVIS_BRANCH-false}112 TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST-false}131 - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false} 132 - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false} 133 - PHP_FPM_UID=${PHP_FPM_UID-1000} 134 - PHP_FPM_GID=${PHP_FPM_GID-1000} 135 - LOCAL_DIR=${LOCAL_DIR-src} 136 - WP_MULTISITE=${WP_MULTISITE-false} 137 - GITHUB_REF=${GITHUB_REF-false} 138 - GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME-false} 113 139 114 140 volumes: … … 121 147 122 148 depends_on: 123 - mysql 149 php: 150 condition: service_started 151 mysql: 152 condition: service_healthy 153 154 ## 155 # The Memcached container. 156 ## 157 memcached: 158 image: memcached 159 160 networks: 161 - wpdevnet 162 163 ports: 164 - 11211:11211 165 166 depends_on: 167 php: 168 condition: service_started 124 169 125 170 volumes: -
branches/5.4/phpcompat.xml.dist
r47122 r58611 12 12 13 13 <!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. --> 14 <arg name="cache" />14 <arg name="cache" value=".cache/phpcompat.json"/> 15 15 16 16 <!-- Set the memory limit to 256M. -
branches/5.4/phpcs.xml.dist
r47207 r58611 7 7 8 8 <!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. --> 9 <arg name="cache" />9 <arg name="cache" value=".cache/phpcs.json"/> 10 10 11 11 <!-- Set the memory limit to 256M. -
branches/5.4/tests/phpunit/includes/abstract-testcase.php
r50604 r58611 181 181 182 182 /** 183 * Allow tests to be skipped on some automated runs.184 * 185 * For test runs on Travis for something other than trunk/master186 * we want to skip tests that only need to run for master.183 * Allows tests to be skipped on some automated runs. 184 * 185 * For test runs on GitHub Actions for something other than trunk, 186 * we want to skip tests that only need to run for trunk. 187 187 */ 188 188 public function skipOnAutomatedBranches() { 189 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables 190 $travis_branch = getenv( 'TRAVIS_BRANCH' ); 191 $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' ); 192 193 if ( ! $travis_branch || ! $travis_pull_request ) { 194 return; 195 } 196 197 if ( 'master' !== $travis_branch || 'false' !== $travis_pull_request ) { 198 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 189 // https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables 190 $github_event_name = getenv( 'GITHUB_EVENT_NAME' ); 191 $github_ref = getenv( 'GITHUB_REF' ); 192 193 if ( $github_event_name ) { 194 // We're on GitHub Actions. 195 $skipped = array( 'pull_request', 'pull_request_target' ); 196 197 if ( in_array( $github_event_name, $skipped, true ) || 'refs/heads/trunk' !== $github_ref ) { 198 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk' ); 199 } 199 200 } 200 201 } -
branches/5.4/tools/local-env/scripts/docker.js
r49364 r58611 5 5 dotenvExpand( 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/5.4/tools/local-env/scripts/install.js
r50303 r58611 45 45 */ 46 46 function wp_cli( cmd ) { 47 execSync( `docker -compose run --rm cli ${cmd}`, { stdio: 'inherit' } );47 execSync( `docker compose run --rm cli ${cmd}`, { stdio: 'inherit' } ); 48 48 } 49 49 … … 54 54 const test_plugin_directory = 'tests/phpunit/data/plugins/wordpress-importer'; 55 55 56 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' } );56 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' } ); 57 57 } -
branches/5.4/tools/local-env/scripts/start.js
r49364 r58611 6 6 7 7 // Start the local-env containers. 8 execSync( 'docker-compose up -d wordpress-develop', { stdio: 'inherit' } ); 8 const containers = ( process.env.LOCAL_PHP_MEMCACHED === 'true' ) 9 ? 'wordpress-develop memcached' 10 : 'wordpress-develop'; 11 execSync( `docker compose up -d ${containers}`, { stdio: 'inherit' } ); 9 12 10 13 // 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.