Changeset 58276
- Timestamp:
- 05/31/2024 07:23:44 PM (10 months ago)
- Location:
- branches/6.4
- Files:
-
- 2 deleted
- 11 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/6.4
- Property svn:mergeinfo changed
/trunk merged: 57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/6.4/.github/workflows/coding-standards.yml
r57002 r58276 47 47 jobs: 48 48 # Runs PHP coding standards checks. 49 #50 # Violations are reported inline with annotations.51 #52 # Performs the following steps:53 # - Checks out the repository.54 # - Sets up PHP.55 # - Configures caching for PHPCS scans.56 # - Installs Composer dependencies.57 # - Make Composer packages available globally.58 # - Runs PHPCS on the full codebase with warnings suppressed.59 # - Generate a report for displaying issues as pull request annotations.60 # - Runs PHPCS on the `tests` directory without warnings suppressed.61 # - Generate a report for displaying `test` directory issues as pull request annotations.62 # - Ensures version-controlled files are not modified or deleted.63 49 phpcs: 64 50 name: PHP coding standards 65 runs-on: ubuntu-latest51 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk 66 52 permissions: 67 53 contents: read 68 timeout-minutes: 2069 54 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 70 55 71 steps:72 - name: Checkout repository73 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.074 with:75 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}76 77 - name: Set up PHP78 uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2.25.479 with:80 php-version: 'latest'81 coverage: none82 tools: cs2pr83 84 # This date is used to ensure that the PHPCS cache is cleared at least once every week.85 # http://man7.org/linux/man-pages/man1/date.1.html86 - name: "Get last Monday's date"87 id: get-date88 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT89 90 - name: Cache PHPCS scan cache91 uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.192 with:93 path: |94 .cache/phpcs-src.json95 .cache/phpcs-tests.json96 key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}97 98 # Since Composer dependencies are installed using `composer update` and no lock file is in version control,99 # passing a custom cache suffix ensures that the cache is flushed at least once per week.100 - name: Install Composer dependencies101 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0102 with:103 custom-cache-suffix: ${{ steps.get-date.outputs.date }}104 105 - name: Make Composer packages available globally106 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH107 108 - name: Run PHPCS on all Core files109 id: phpcs-core110 run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml111 112 - name: Show PHPCS results in PR113 if: ${{ always() && steps.phpcs-core.outcome == 'failure' }}114 run: cs2pr ./.cache/phpcs-report.xml115 116 - name: Check test suite files for warnings117 id: phpcs-tests118 run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml119 120 - name: Show test suite scan results in PR121 if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }}122 run: cs2pr ./.cache/phpcs-tests-report.xml123 124 - name: Ensure version-controlled files are not modified during the tests125 run: git diff --exit-code126 127 56 # Runs the JavaScript coding standards checks. 128 #129 # JSHint violations are not currently reported inline with annotations.130 #131 # Performs the following steps:132 # - Checks out the repository.133 # - Sets up Node.js.134 # - Logs debug information about the GitHub Action runner.135 # - Installs npm dependencies.136 # - Run the WordPress JSHint checks.137 # - Ensures version-controlled files are not modified or deleted.138 57 jshint: 139 58 name: JavaScript coding standards 140 runs-on: ubuntu-latest59 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk 141 60 permissions: 142 61 contents: read 143 timeout-minutes: 20144 62 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 145 env:146 PUPPETEER_SKIP_DOWNLOAD: ${{ true }}147 148 steps:149 - name: Checkout repository150 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0151 with:152 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}153 154 - name: Set up Node.js155 uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1156 with:157 node-version-file: '.nvmrc'158 cache: npm159 160 - name: Log debug information161 run: |162 npm --version163 node --version164 git --version165 svn --version166 167 - name: Install npm Dependencies168 run: npm ci169 170 - name: Run JSHint171 run: npm run grunt jshint172 173 - name: Ensure version-controlled files are not modified or deleted174 run: git diff --exit-code175 63 176 64 slack-notifications: … … 208 96 steps: 209 97 - name: Dispatch workflow run 210 uses: actions/github-script@ d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.198 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 211 99 with: 212 100 retries: 2 -
branches/6.4/.github/workflows/end-to-end-tests.yml
r56954 r58276 37 37 jobs: 38 38 # Runs the end-to-end test suite. 39 #40 # Performs the following steps:41 # - Sets environment variables.42 # - Checks out the repository.43 # - Sets up Node.js.44 # - Logs debug information about the GitHub Action runner.45 # - Installs npm dependencies.46 # - Install Playwright browsers.47 # - Builds WordPress to run from the `build` directory.48 # - Starts the WordPress Docker container.49 # - Logs the running Docker containers.50 # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).51 # - Install WordPress within the Docker container.52 # - Install Gutenberg.53 # - Run the E2E tests.54 # - Ensures version-controlled files are not modified or deleted.55 39 e2e-tests: 56 name: E2E Testswith SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}57 runs-on: ubuntu-latest40 name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }} 41 uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk 58 42 permissions: 59 43 contents: read 60 timeout-minutes: 2061 44 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 62 45 strategy: … … 64 47 matrix: 65 48 LOCAL_SCRIPT_DEBUG: [ true, false ] 66 67 steps: 68 - name: Configure environment variables 69 run: | 70 echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV 71 echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV 72 73 - name: Checkout repository 74 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 75 with: 76 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} 77 78 - name: Set up Node.js 79 uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 80 with: 81 node-version-file: '.nvmrc' 82 cache: npm 83 84 - name: Log debug information 85 run: | 86 npm --version 87 node --version 88 curl --version 89 git --version 90 svn --version 91 locale -a 92 93 - name: Install npm Dependencies 94 run: npm ci 95 96 - name: Install Playwright browsers 97 run: npx playwright install --with-deps 98 99 - name: Build WordPress 100 run: npm run build 101 102 - name: Start Docker environment 103 run: | 104 npm run env:start 105 106 - name: Log running Docker containers 107 run: docker ps -a 108 109 - name: Docker debug information 110 run: | 111 docker -v 112 docker-compose -v 113 docker-compose run --rm mysql mysql --version 114 docker-compose run --rm php php --version 115 docker-compose run --rm php php -m 116 docker-compose run --rm php php -i 117 docker-compose run --rm php locale -a 118 119 - name: Install WordPress 120 env: 121 LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }} 122 run: npm run env:install 123 124 - name: Install Gutenberg 125 run: npm run env:cli -- plugin install gutenberg --path=/var/www/${{ env.LOCAL_DIR }} 126 127 - name: Run E2E tests 128 run: npm run test:e2e 129 130 - name: Archive debug artifacts (screenshots, HTML snapshots) 131 uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 132 if: always() 133 with: 134 name: failures-artifacts 135 path: artifacts 136 if-no-files-found: ignore 137 138 - name: Ensure version-controlled files are not modified or deleted 139 run: git diff --exit-code 49 with: 50 LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }} 140 51 141 52 slack-notifications: … … 172 83 steps: 173 84 - name: Dispatch workflow run 174 uses: actions/github-script@ d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.185 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 175 86 with: 176 87 retries: 2 -
branches/6.4/.github/workflows/javascript-tests.yml
r57002 r58276 45 45 jobs: 46 46 # Runs the QUnit tests for WordPress. 47 #48 # Performs the following steps:49 # - Checks out the repository.50 # - Sets up Node.js.51 # - Logs debug information about the GitHub Action runner.52 # - Installs npm dependencies.53 # - Run the WordPress QUnit tests.54 # - Ensures version-controlled files are not modified or deleted.55 47 test-js: 56 48 name: QUnit Tests 57 runs-on: ubuntu-latest49 uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk 58 50 permissions: 59 51 contents: read 60 timeout-minutes: 2061 52 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 62 63 steps:64 - name: Checkout repository65 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.066 with:67 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}68 69 - name: Set up Node.js70 uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.171 with:72 node-version-file: '.nvmrc'73 cache: npm74 75 - name: Log debug information76 run: |77 npm --version78 node --version79 git --version80 svn --version81 82 - name: Install npm Dependencies83 run: npm ci84 85 - name: Run QUnit tests86 run: npm run grunt qunit:compiled87 88 - name: Ensure version-controlled files are not modified or deleted89 run: git diff --exit-code90 53 91 54 slack-notifications: … … 123 86 steps: 124 87 - name: Dispatch workflow run 125 uses: actions/github-script@ d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.188 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 126 89 with: 127 90 retries: 2 -
branches/6.4/.github/workflows/performance.yml
r58272 r58276 30 30 permissions: {} 31 31 32 env:33 PUPPETEER_SKIP_DOWNLOAD: ${{ true }}34 35 # Performance testing should be performed in an environment reflecting a standard production environment.36 LOCAL_WP_DEBUG: false37 LOCAL_SCRIPT_DEBUG: false38 LOCAL_SAVEQUERIES: false39 LOCAL_WP_DEVELOPMENT_MODE: "''"40 LOCAL_PHP: "8.2-fpm"41 42 # This workflow takes two sets of measurements — one for the current commit,43 # and another against a consistent version that is used as a baseline measurement.44 # This is done to isolate variance in measurements caused by the GitHub runners45 # from differences caused by code changes between commits. The BASE_TAG value here46 # represents the version being used for baseline measurements. It should only be47 # changed if we want to normalize results against a different baseline.48 BASE_TAG: '6.1.1'49 LOCAL_DIR: build50 TARGET_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || '' }}51 TARGET_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}52 53 32 jobs: 54 33 # Runs the performance test suite. 55 #56 # Performs the following steps:57 # - Configure environment variables.58 # - Checkout repository.59 # - Set up Node.js.60 # - Log debug information.61 # - Install npm dependencies.62 # - Install Playwright browsers.63 # - Build WordPress.64 # - Start Docker environment.65 # - Log running Docker containers.66 # - Docker debug information.67 # - Install WordPress.68 # - Install WordPress Importer plugin.69 # - Import mock data.70 # - Update permalink structure.71 # - Install MU plugin.72 # - Run performance tests (current commit).73 # - Print performance tests results.74 # - Check out target commit (target branch or previous commit).75 # - Switch Node.js versions if necessary.76 # - Install npm dependencies.77 # - Build WordPress.78 # - Run performance tests (previous/target commit).79 # - Print target performance tests results.80 # - Reset to original commit.81 # - Switch Node.js versions if necessary.82 # - Install npm dependencies.83 # - Set the environment to the baseline version.84 # - Run baseline performance tests.85 # - Print baseline performance tests results.86 # - Compare results with base.87 # - Add workflow summary.88 # - Set the base sha.89 # - Set commit details.90 # - Publish performance results.91 # - Ensure version-controlled files are not modified or deleted.92 # - Dispatch workflow run.93 34 performance: 94 35 name: Run performance tests 95 runs-on: ubuntu-latest36 uses: WordPress/wordpress-develop/.github/workflows/reusable-performance.yml@trunk 96 37 permissions: 97 38 contents: read 98 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 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@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 108 with: 109 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} 110 111 - name: Set up Node.js 112 uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 113 with: 114 node-version-file: '.nvmrc' 115 cache: npm 116 117 - name: Log debug information 118 run: | 119 npm --version 120 node --version 121 curl --version 122 git --version 123 svn --version 124 locale -a 125 126 - name: Install npm dependencies 127 run: npm ci 128 129 - name: Install Playwright browsers 130 run: npx playwright install --with-deps 131 132 - name: Build WordPress 133 run: npm run build 134 135 - name: Start Docker environment 136 run: | 137 npm run env:start 138 139 - name: Log running Docker containers 140 run: docker ps -a 141 142 - name: Docker debug information 143 run: | 144 docker -v 145 docker-compose -v 146 docker-compose run --rm mysql mysql --version 147 docker-compose run --rm php php --version 148 docker-compose run --rm php php -m 149 docker-compose run --rm php php -i 150 docker-compose run --rm php locale -a 151 152 - name: Install WordPress 153 run: npm run env:install 154 155 - name: Install WordPress Importer plugin 156 run: npm run env:cli -- plugin install wordpress-importer --activate --path=/var/www/${{ env.LOCAL_DIR }} 157 158 - name: Import mock data 159 run: | 160 curl -O https://raw.githubusercontent.com/WordPress/theme-test-data/b9752e0533a5acbb876951a8cbb5bcc69a56474c/themeunittestdata.wordpress.xml 161 npm run env:cli -- import themeunittestdata.wordpress.xml --authors=create --path=/var/www/${{ env.LOCAL_DIR }} 162 rm themeunittestdata.wordpress.xml 163 164 - name: Update permalink structure 165 run: | 166 npm run env:cli -- rewrite structure '/%year%/%monthnum%/%postname%/' --path=/var/www/${{ env.LOCAL_DIR }} 167 168 - name: Install MU plugin 169 run: | 170 mkdir ./${{ env.LOCAL_DIR }}/wp-content/mu-plugins 171 cp ./tests/performance/wp-content/mu-plugins/server-timing.php ./${{ env.LOCAL_DIR }}/wp-content/mu-plugins/server-timing.php 172 173 - name: Run performance tests (current commit) 174 run: npm run test:performance 175 176 - name: Print performance tests results 177 run: node ./tests/performance/results.js 178 179 - name: Check out target commit (target branch or previous commit) 180 run: | 181 if [[ -z "$TARGET_REF" ]]; then 182 git fetch -n origin $TARGET_SHA 183 else 184 git fetch -n origin $TARGET_REF 185 fi 186 git reset --hard $TARGET_SHA 187 188 - name: Set up Node.js 189 uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 190 with: 191 node-version-file: '.nvmrc' 192 cache: npm 193 194 - name: Install npm dependencies 195 run: npm ci 196 197 - name: Build WordPress 198 run: npm run build 199 200 - name: Run target performance tests (base/previous commit) 201 env: 202 TEST_RESULTS_PREFIX: before 203 run: npm run test:performance 204 205 - name: Print target performance tests results 206 env: 207 TEST_RESULTS_PREFIX: before 208 run: node ./tests/performance/results.js 209 210 - name: Reset to original commit 211 run: git reset --hard $GITHUB_SHA 212 213 - name: Set up Node.js 214 uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 215 with: 216 node-version-file: '.nvmrc' 217 cache: npm 218 219 - name: Install npm dependencies 220 run: npm ci 221 222 - name: Set the environment to the baseline version 223 run: | 224 npm run env:cli -- core update --version=${{ env.BASE_TAG }} --force --path=/var/www/${{ env.LOCAL_DIR }} 225 npm run env:cli -- core version --path=/var/www/${{ env.LOCAL_DIR }} 226 227 - name: Run baseline performance tests 228 env: 229 TEST_RESULTS_PREFIX: base 230 run: npm run test:performance 231 232 - name: Print baseline performance tests results 233 env: 234 TEST_RESULTS_PREFIX: base 235 run: node ./tests/performance/results.js 236 237 - name: Compare results with base 238 run: node ./tests/performance/compare-results.js ${{ runner.temp }}/summary.md 239 240 - name: Add workflow summary 241 run: cat ${{ runner.temp }}/summary.md >> $GITHUB_STEP_SUMMARY 242 243 - name: Set the base sha 244 # Only needed when publishing results. 245 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }} 246 uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 247 id: base-sha 248 with: 249 github-token: ${{ secrets.GITHUB_TOKEN }} 250 script: | 251 const baseRef = await github.rest.git.getRef({ owner: context.repo.owner, repo: context.repo.repo, ref: 'tags/${{ env.BASE_TAG }}' }); 252 return baseRef.data.object.sha; 253 254 - name: Set commit details 255 # Only needed when publishing results. 256 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }} 257 uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 258 id: commit-timestamp 259 with: 260 github-token: ${{ secrets.GITHUB_TOKEN }} 261 script: | 262 const commit_details = await github.rest.git.getCommit({ owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha }); 263 return parseInt((new Date( commit_details.data.author.date ).getTime() / 1000).toFixed(0)) 264 265 - name: Publish performance results 266 # Only publish results on pushes to trunk. 267 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }} 268 env: 269 BASE_SHA: ${{ steps.base-sha.outputs.result }} 270 COMMITTED_AT: ${{ steps.commit-timestamp.outputs.result }} 271 CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }} 272 HOST_NAME: "www.codevitals.run" 273 run: node ./tests/performance/log-results.js $CODEVITALS_PROJECT_TOKEN trunk $GITHUB_SHA $BASE_SHA $COMMITTED_AT $HOST_NAME 274 275 - name: Ensure version-controlled files are not modified or deleted 276 run: git diff --exit-code 39 if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ! contains( github.event.before, '00000000' ) }} 40 with: 41 php-version: '8.2' 277 42 278 43 slack-notifications: … … 310 75 steps: 311 76 - name: Dispatch workflow run 312 uses: actions/github-script@ d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.177 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 313 78 with: 314 79 retries: 2 -
branches/6.4/.github/workflows/php-compatibility.yml
r57002 r58276 41 41 42 42 jobs: 43 44 43 # Runs PHP compatibility testing. 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 # - Configures caching for PHP compatibility scans.53 # - Installs Composer dependencies.54 # - Make Composer packages available globally.55 # - Runs the PHP compatibility tests.56 # - Generate a report for displaying issues as pull request annotations.57 # - Ensures version-controlled files are not modified or deleted.58 44 php-compatibility: 59 45 name: Check PHP compatibility 60 runs-on: ubuntu-latest46 uses: WordPress/wordpress-develop/.github/workflows/reusable-php-compatibility.yml@trunk 61 47 permissions: 62 48 contents: read 63 timeout-minutes: 2064 49 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 65 66 steps:67 - name: Checkout repository68 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.069 with:70 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}71 72 - name: Set up PHP73 uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2.25.474 with:75 php-version: '7.4'76 coverage: none77 tools: cs2pr78 79 - name: Log debug information80 run: |81 composer --version82 83 # This date is used to ensure that the PHP compatibility cache is cleared at least once every week.84 # http://man7.org/linux/man-pages/man1/date.1.html85 - name: "Get last Monday's date"86 id: get-date87 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT88 89 - name: Cache PHP compatibility scan cache90 uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.191 with:92 path: .cache/phpcompat.json93 key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }}94 95 # Since Composer dependencies are installed using `composer update` and no lock file is in version control,96 # passing a custom cache suffix ensures that the cache is flushed at least once per week.97 - name: Install Composer dependencies98 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.099 with:100 custom-cache-suffix: ${{ steps.get-date.outputs.date }}101 102 - name: Make Composer packages available globally103 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH104 105 - name: Run PHP compatibility tests106 id: phpcs107 run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml108 109 - name: Show PHPCompatibility results in PR110 if: ${{ always() && steps.phpcs.outcome == 'failure' }}111 run: cs2pr ./.cache/phpcs-compat-report.xml112 113 - name: Ensure version-controlled files are not modified or deleted114 run: git diff --exit-code115 50 116 51 slack-notifications: … … 148 83 steps: 149 84 - name: Dispatch workflow run 150 uses: actions/github-script@ d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.185 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 151 86 with: 152 87 retries: 2 -
branches/6.4/.github/workflows/phpunit-tests.yml
r57002 r58276 32 32 33 33 jobs: 34 #35 34 # Creates a PHPUnit test job for each PHP/MySQL combination. 36 35 # 37 36 test-with-mysql: 38 37 name: PHP ${{ matrix.php }} 39 uses: WordPress/wordpress-develop/.github/workflows/ phpunit-tests-run.yml@trunk38 uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests.yml@trunk 40 39 permissions: 41 40 contents: read … … 89 88 test-with-mariadb: 90 89 name: PHP ${{ matrix.php }} 91 uses: WordPress/wordpress-develop/.github/workflows/ phpunit-tests-run.yml@trunk90 uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests.yml@trunk 92 91 permissions: 93 92 contents: read … … 162 161 steps: 163 162 - name: Dispatch workflow run 164 uses: actions/github-script@ d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1163 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 165 164 with: 166 165 retries: 2 -
branches/6.4/.github/workflows/test-build-processes.yml
r58275 r58276 1 name: Test npm1 name: Test Build Processes 2 2 3 3 on: … … 38 38 permissions: {} 39 39 40 env:41 PUPPETEER_SKIP_DOWNLOAD: ${{ true }}42 43 40 jobs: 44 # Verifies that installing npm dependencies and building WordPress works as expected. 45 # 46 # Performs the following steps: 47 # - Checks out the repository. 48 # - Sets up Node.js. 49 # - Logs debug information about the GitHub Action runner. 50 # - Installs npm dependencies. 51 # - Builds WordPress to run from the `build` directory. 52 # - Cleans up after building WordPress to the `build` directory. 53 # - Ensures version-controlled files are not modified or deleted. 54 # - Builds WordPress to run from the `src` directory. 55 # - Cleans up after building WordPress to the `src` directory. 56 # - Ensures version-controlled files are not modified or deleted. 57 test-npm: 58 name: Test npm on ${{ matrix.os }} 59 runs-on: ${{ matrix.os }} 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 60 45 permissions: 61 46 contents: read 62 timeout-minutes: 2063 47 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 64 48 strategy: … … 66 50 matrix: 67 51 os: [ ubuntu-latest, windows-latest ] 52 directory: [ 'src', 'build' ] 53 include: 54 # Only prepare artifacts for Playground 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 68 63 69 steps: 70 - name: Checkout repository 71 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 72 with: 73 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} 74 75 - name: Set up Node.js 76 uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 77 with: 78 node-version-file: '.nvmrc' 79 check-latest: true 80 cache: npm 81 82 - name: Log debug information 83 run: | 84 npm --version 85 node --version 86 curl --version 87 git --version 88 svn --version 89 90 - name: Install npm Dependencies 91 run: npm ci 92 93 - name: Build WordPress in /src 94 run: npm run build:dev 95 96 - name: Clean after building in /src 97 run: npm run grunt clean -- --dev 98 99 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 100 run: git diff --exit-code 101 102 - name: Build WordPress 103 run: npm run build 104 105 - name: Clean after building 106 run: npm run grunt clean 107 108 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 109 run: git diff --exit-code 110 111 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 64 # Tests the WordPress Core build process on MacOS. 112 65 # 113 # 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. 114 67 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 115 68 # … … 117 70 # currently no way to determine the OS being used on a given job. 118 71 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 119 # 120 # Performs the following steps: 121 # - Checks out the repository. 122 # - Sets up Node.js. 123 # - Logs debug information about the GitHub Action runner. 124 # - Installs npm dependencies. 125 # - Builds WordPress to run from the `build` directory. 126 # - Cleans up after building WordPress to the `build` directory. 127 # - Ensures version-controlled files are not modified or deleted. 128 # - Builds WordPress to run from the `src` directory. 129 # - Cleans up after building WordPress to the `src` directory. 130 # - Ensures version-controlled files are not modified or deleted. 131 test-npm-macos: 132 name: Test npm on MacOS 133 runs-on: macos-latest 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 134 75 permissions: 135 76 contents: read 136 timeout-minutes: 30137 77 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 138 steps: 139 - name: Checkout repository 140 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 141 with: 142 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} 143 144 - name: Set up Node.js 145 uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 146 with: 147 node-version-file: '.nvmrc' 148 check-latest: true 149 cache: npm 150 151 - name: Log debug information 152 run: | 153 npm --version 154 node --version 155 curl --version 156 git --version 157 svn --version 158 159 - name: Install npm Dependencies 160 run: npm ci 161 162 - name: Build WordPress in /src 163 run: npm run build:dev 164 165 - name: Clean after building in /src 166 run: npm run grunt clean -- --dev 167 168 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 169 run: git diff --exit-code 170 171 - name: Build WordPress 172 run: npm run build 173 174 - name: Clean after building 175 run: npm run grunt clean 176 177 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 178 run: git diff --exit-code 78 strategy: 79 fail-fast: false 80 matrix: 81 os: [ macos-latest ] 82 directory: [ 'src', 'build' ] 83 with: 84 os: ${{ matrix.os }} 85 directory: ${{ matrix.directory }} 86 test-emoji: false 179 87 180 88 slack-notifications: … … 184 92 actions: read 185 93 contents: read 186 needs: [ test- npm, test-npm-macos ]94 needs: [ test-core-build-process, test-core-build-process-macos ] 187 95 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 188 96 with: … … 212 120 steps: 213 121 - name: Dispatch workflow run 214 uses: actions/github-script@ d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1122 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 215 123 with: 216 124 retries: 2 -
branches/6.4/docker-compose.yml
r57862 r58276 1 version: '3.7'2 3 1 services: 4 2 -
branches/6.4/tools/local-env/scripts/docker.js
r54096 r58276 6 6 7 7 // Execute any docker-compose command passed to this script. 8 execSync( 'docker -compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );8 execSync( 'docker compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } ); -
branches/6.4/tools/local-env/scripts/install.js
r56042 r58276 47 47 */ 48 48 function wp_cli( cmd ) { 49 execSync( `docker -compose run --rm cli ${cmd}`, { stdio: 'inherit' } );49 execSync( `docker compose run --rm cli ${cmd}`, { stdio: 'inherit' } ); 50 50 } 51 51 … … 56 56 const testPluginDirectory = 'tests/phpunit/data/plugins/wordpress-importer'; 57 57 58 execSync( `docker -compose exec -T php rm -rf ${testPluginDirectory}`, { stdio: 'inherit' } );59 execSync( `docker -compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1`, { stdio: 'inherit' } );58 execSync( `docker compose exec -T php rm -rf ${testPluginDirectory}`, { stdio: 'inherit' } ); 59 execSync( `docker compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1`, { stdio: 'inherit' } ); 60 60 } -
branches/6.4/tools/local-env/scripts/start.js
r55473 r58276 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.