Changeset 58300
- Timestamp:
- 06/03/2024 05:00:05 PM (6 months ago)
- Location:
- branches/6.3
- Files:
-
- 1 deleted
- 10 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/6.3
- Property svn:mergeinfo changed
/trunk merged: 57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/6.3/.github/workflows/coding-standards.yml
r55717 r58300 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 71 steps: 72 - name: Checkout repository 73 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 74 75 - name: Set up PHP 76 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 77 with: 78 php-version: '7.4' 79 coverage: none 80 tools: cs2pr 81 82 # This date is used to ensure that the PHPCS cache is cleared at least once every week. 83 # http://man7.org/linux/man-pages/man1/date.1.html 84 - name: "Get last Monday's date" 85 id: get-date 86 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT 87 88 - name: Cache PHPCS scan cache 89 uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6 90 with: 91 path: | 92 .cache/phpcs-src.json 93 .cache/phpcs-tests.json 94 key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }} 95 96 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 97 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 98 - name: Install Composer dependencies 99 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 100 with: 101 custom-cache-suffix: ${{ steps.get-date.outputs.date }} 102 103 - name: Make Composer packages available globally 104 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 105 106 - name: Run PHPCS on all Core files 107 id: phpcs-core 108 run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml 109 110 - name: Show PHPCS results in PR 111 if: ${{ always() && steps.phpcs-core.outcome == 'failure' }} 112 run: cs2pr ./.cache/phpcs-report.xml 113 114 - name: Check test suite files for warnings 115 id: phpcs-tests 116 run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml 117 118 - name: Show test suite scan results in PR 119 if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }} 120 run: cs2pr ./.cache/phpcs-tests-report.xml 121 122 - name: Ensure version-controlled files are not modified during the tests 123 run: git diff --exit-code 55 with: 56 php-version: '7.4' 124 57 125 58 # Runs the JavaScript coding standards checks. 126 #127 # JSHint violations are not currently reported inline with annotations.128 #129 # Performs the following steps:130 # - Checks out the repository.131 # - Sets up Node.js.132 # - Logs debug information about the GitHub Action runner.133 # - Installs npm dependencies.134 # - Run the WordPress JSHint checks.135 # - Ensures version-controlled files are not modified or deleted.136 59 jshint: 137 60 name: JavaScript coding standards 138 runs-on: ubuntu-latest61 uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk 139 62 permissions: 140 63 contents: read 141 timeout-minutes: 20142 64 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 143 env:144 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}145 146 steps:147 - name: Checkout repository148 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0149 150 - name: Set up Node.js151 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0152 with:153 node-version-file: '.nvmrc'154 cache: npm155 156 - name: Log debug information157 run: |158 npm --version159 node --version160 git --version161 svn --version162 163 - name: Install npm Dependencies164 run: npm ci165 166 - name: Run JSHint167 run: npm run grunt jshint168 169 - name: Ensure version-controlled files are not modified or deleted170 run: git diff --exit-code171 65 172 66 slack-notifications: … … 204 98 steps: 205 99 - name: Dispatch workflow run 206 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.0100 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 207 101 with: 208 102 retries: 2 -
branches/6.3/.github/workflows/end-to-end-tests.yml
r56539 r58300 36 36 jobs: 37 37 # Runs the end-to-end test suite. 38 #39 # Performs the following steps:40 # - Sets environment variables.41 # - Checks out the repository.42 # - Sets up Node.js.43 # - Logs debug information about the GitHub Action runner.44 # - Installs npm dependencies.45 # - Builds WordPress to run from the `build` directory.46 # - Starts the WordPress Docker container.47 # - Logs the running Docker containers.48 # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).49 # - Install WordPress within the Docker container.50 # - Run the E2E tests.51 # - Ensures version-controlled files are not modified or deleted.52 38 e2e-tests: 53 name: E2E Testswith SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}54 runs-on: ubuntu-latest39 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 55 41 permissions: 56 42 contents: read 57 timeout-minutes: 2058 43 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 59 44 strategy: … … 61 46 matrix: 62 47 LOCAL_SCRIPT_DEBUG: [ true, false ] 63 64 steps: 65 - name: Configure environment variables 66 run: | 67 echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV 68 echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV 69 70 - name: Checkout repository 71 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 72 73 - name: Set up Node.js 74 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 75 with: 76 node-version-file: '.nvmrc' 77 cache: npm 78 79 - name: Log debug information 80 run: | 81 npm --version 82 node --version 83 curl --version 84 git --version 85 svn --version 86 locale -a 87 88 - name: Install npm Dependencies 89 run: npm ci 90 91 - name: Build WordPress 92 run: npm run build 93 94 - name: Start Docker environment 95 run: | 96 npm run env:start 97 98 - name: Log running Docker containers 99 run: docker ps -a 100 101 - name: Docker debug information 102 run: | 103 docker -v 104 docker-compose -v 105 docker-compose run --rm mysql mysql --version 106 docker-compose run --rm php php --version 107 docker-compose run --rm php php -m 108 docker-compose run --rm php php -i 109 docker-compose run --rm php locale -a 110 111 - name: Install WordPress 112 env: 113 LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }} 114 run: npm run env:install 115 116 - name: Run E2E tests 117 run: npm run test:e2e 118 119 - name: Archive debug artifacts (screenshots, HTML snapshots) 120 uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 121 if: always() 122 with: 123 name: failures-artifacts 124 path: artifacts 125 if-no-files-found: ignore 126 127 - name: Ensure version-controlled files are not modified or deleted 128 run: git diff --exit-code 48 with: 49 LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }} 50 install-gutenberg: false 129 51 130 52 failed-workflow: … … 144 66 steps: 145 67 - name: Dispatch workflow run 146 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.068 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 147 69 with: 148 70 retries: 2 -
branches/6.3/.github/workflows/javascript-tests.yml
r55717 r58300 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@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.066 67 - name: Set up Node.js68 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.069 with:70 node-version-file: '.nvmrc'71 cache: npm72 73 - name: Log debug information74 run: |75 npm --version76 node --version77 git --version78 svn --version79 80 - name: Install npm Dependencies81 run: npm ci82 83 - name: Run QUnit tests84 run: npm run grunt qunit:compiled85 86 - name: Ensure version-controlled files are not modified or deleted87 run: git diff --exit-code88 53 89 54 slack-notifications: … … 120 85 steps: 121 86 - name: Dispatch workflow run 122 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.087 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 123 88 with: 124 89 retries: 2 -
branches/6.3/.github/workflows/php-compatibility.yml
r55717 r58300 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 repository 68 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 69 70 - name: Set up PHP 71 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 72 with: 73 php-version: '7.4' 74 coverage: none 75 tools: cs2pr 76 77 - name: Log debug information 78 run: | 79 composer --version 80 81 # This date is used to ensure that the PHP compatibility cache is cleared at least once every week. 82 # http://man7.org/linux/man-pages/man1/date.1.html 83 - name: "Get last Monday's date" 84 id: get-date 85 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT 86 87 - name: Cache PHP compatibility scan cache 88 uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6 89 with: 90 path: .cache/phpcompat.json 91 key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }} 92 93 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 94 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 95 - name: Install Composer dependencies 96 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 97 with: 98 custom-cache-suffix: ${{ steps.get-date.outputs.date }} 99 100 - name: Make Composer packages available globally 101 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 102 103 - name: Run PHP compatibility tests 104 id: phpcs 105 run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml 106 107 - name: Show PHPCompatibility results in PR 108 if: ${{ always() && steps.phpcs.outcome == 'failure' }} 109 run: cs2pr ./.cache/phpcs-compat-report.xml 110 111 - name: Ensure version-controlled files are not modified or deleted 112 run: git diff --exit-code 50 with: 51 php-version: '7.4' 113 52 114 53 slack-notifications: … … 145 84 steps: 146 85 - name: Dispatch workflow run 147 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.086 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 148 87 with: 149 88 retries: 2 -
branches/6.3/.github/workflows/phpunit-tests.yml
r56141 r58300 31 31 permissions: {} 32 32 33 env:34 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}35 LOCAL_PHP_MEMCACHED: ${{ false }}36 37 33 jobs: 38 # Runs the PHPUnit tests for WordPress.39 34 # 40 # Performs the following steps: 41 # - Sets environment variables. 42 # - Checks out the repository. 43 # - Sets up Node.js. 44 # - Sets up PHP. 45 # - Installs Composer dependencies. 46 # - Installs npm dependencies 47 # - Logs general debug information about the runner. 48 # - Logs Docker debug information (about the Docker installation within the runner). 49 # - Starts the WordPress Docker container. 50 # - Logs the running Docker containers. 51 # - Logs debug information about what's installed within the WordPress Docker containers. 52 # - Install WordPress within the Docker container. 53 # - Run the PHPUnit tests. 54 # - Ensures version-controlled files are not modified or deleted. 55 # - Checks out the WordPress Test reporter repository. 56 # - Submit the test results to the WordPress.org host test results. 35 # Creates a PHPUnit test job for each PHP/MySQL combination. 36 # 57 37 test-php: 58 38 name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} 59 runs-on: ${{ matrix.os }}39 uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests.yml@trunk 60 40 permissions: 61 41 contents: read 62 timeout-minutes: 2042 secrets: inherit 63 43 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 64 44 strategy: 65 45 fail-fast: false 66 46 matrix: 47 os: [ ubuntu-latest ] 67 48 php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] 68 os: [ ubuntu-latest ] 49 db-type: [ 'mysql' ] 50 db-version: [ '5.7' ] 51 multisite: [ false, true ] 69 52 memcached: [ false ] 70 multisite: [ false, true ] 53 71 54 include: 72 55 # Include jobs for PHP 7.4 with memcached. 73 - php: '7.4' 74 os: ubuntu-latest 56 - os: ubuntu-latest 57 php: '7.4' 58 db-type: 'mysql' 59 db-version: '5.7' 60 multisite: false 75 61 memcached: true 62 - os: ubuntu-latest 63 php: '7.4' 64 db-type: 'mysql' 65 db-version: '5.7' 66 multisite: true 67 memcached: true 68 # Report the results of the PHP 7.4 without memcached job. 69 - os: ubuntu-latest 70 php: '7.4' 71 db-type: 'mysql' 72 db-version: '5.7' 76 73 multisite: false 77 - php: '7.4'78 os: ubuntu-latest79 memcached: true80 multisite: true81 # Report the results of the PHP 7.4 without memcached job.82 - php: '7.4'83 os: ubuntu-latest84 74 memcached: false 85 multisite: false86 75 report: true 87 88 env: 89 LOCAL_PHP: ${{ matrix.php }}-fpm 90 LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }} 91 PHPUNIT_CONFIG: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} 92 93 steps: 94 - name: Configure environment variables 95 run: | 96 echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV 97 echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV 98 99 - name: Checkout repository 100 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 101 102 - name: Set up Node.js 103 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 104 with: 105 node-version-file: '.nvmrc' 106 cache: npm 107 108 ## 109 # This allows Composer dependencies to be installed using a single step. 110 # 111 # Since the tests are currently run within the Docker containers where the PHP version varies, 112 # the same PHP version needs to be configured for the action runner machine so that the correct 113 # dependency versions are installed and cached. 114 ## 115 - name: Set up PHP 116 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 117 with: 118 php-version: '${{ matrix.php }}' 119 coverage: none 120 121 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 122 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 123 - name: Install Composer dependencies 124 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 125 with: 126 custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") 127 128 - name: Install npm dependencies 129 run: npm ci 130 131 - name: General debug information 132 run: | 133 npm --version 134 node --version 135 curl --version 136 git --version 137 svn --version 138 composer --version 139 locale -a 140 141 - name: Docker debug information 142 run: | 143 docker -v 144 docker-compose -v 145 146 - name: Start Docker environment 147 run: | 148 npm run env:start 149 150 - name: Log running Docker containers 151 run: docker ps -a 152 153 - name: WordPress Docker container debug information 154 run: | 155 docker-compose run --rm mysql mysql --version 156 docker-compose run --rm php php --version 157 docker-compose run --rm php php -m 158 docker-compose run --rm php php -i 159 docker-compose run --rm php locale -a 160 161 - name: Install WordPress 162 run: npm run env:install 163 164 - name: Run PHPUnit tests 165 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} 166 167 - name: Run AJAX tests 168 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax 169 170 - name: Run ms-files tests as a multisite install 171 if: ${{ matrix.multisite }} 172 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c tests/phpunit/multisite.xml --group ms-files 173 174 - name: Run external HTTP tests 175 if: ${{ ! matrix.multisite }} 176 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c phpunit.xml.dist --group external-http 177 178 # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist. 179 - name: Run (Xdebug) tests 180 run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__ 181 182 - name: Ensure version-controlled files are not modified or deleted 183 run: git diff --exit-code 184 185 - name: Checkout the WordPress Test Reporter 186 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} 187 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 188 with: 189 repository: 'WordPress/phpunit-test-runner' 190 path: 'test-runner' 191 192 - name: Submit test results to the WordPress.org host test results 193 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} 194 env: 195 WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}" 196 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 76 with: 77 os: ${{ matrix.os }} 78 php: ${{ matrix.php }} 79 db-type: ${{ matrix.db-type }} 80 db-version: ${{ matrix.db-version }} 81 multisite: ${{ matrix.multisite }} 82 memcached: ${{ matrix.memcached }} 83 phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} 84 report: ${{ matrix.report || false }} 197 85 198 86 slack-notifications: … … 229 117 steps: 230 118 - name: Dispatch workflow run 231 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.0119 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 232 120 with: 233 121 retries: 2 -
branches/6.3/.github/workflows/test-build-processes.yml
r58299 r58300 1 name: Test npm1 name: Test Build Processes 2 2 3 3 on: … … 38 38 permissions: {} 39 39 40 env:41 PUPPETEER_SKIP_CHROMIUM_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 with: 54 os: ${{ matrix.os }} 55 directory: ${{ matrix.directory }} 56 test-emoji: false 68 57 69 steps: 70 - name: Checkout repository 71 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 72 73 - name: Set up Node.js 74 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 75 with: 76 node-version-file: '.nvmrc' 77 cache: npm 78 79 - name: Log debug information 80 run: | 81 npm --version 82 node --version 83 curl --version 84 git --version 85 svn --version 86 87 - name: Install npm Dependencies 88 run: npm ci 89 90 - name: Build WordPress in /src 91 run: npm run build:dev 92 93 - name: Clean after building in /src 94 run: npm run grunt clean -- --dev 95 96 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 97 run: git diff --exit-code 98 99 - name: Build WordPress 100 run: npm run build 101 102 - name: Clean after building 103 run: npm run grunt clean 104 105 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 106 run: git diff --exit-code 107 108 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 58 # Tests the WordPress Core build process on MacOS. 109 59 # 110 # This is separate from the job above in order to use stricter conditions aboutwhen to run.60 # This is separate from the job above in order to use stricter conditions when determining when to run. 111 61 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 112 62 # … … 114 64 # currently no way to determine the OS being used on a given job. 115 65 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 116 # 117 # Performs the following steps: 118 # - Checks out the repository. 119 # - Sets up Node.js. 120 # - Logs debug information about the GitHub Action runner. 121 # - Installs npm dependencies. 122 # - Builds WordPress to run from the `build` directory. 123 # - Cleans up after building WordPress to the `build` directory. 124 # - Ensures version-controlled files are not modified or deleted. 125 # - Builds WordPress to run from the `src` directory. 126 # - Cleans up after building WordPress to the `src` directory. 127 # - Ensures version-controlled files are not modified or deleted. 128 test-npm-macos: 129 name: Test npm on MacOS 130 runs-on: macos-latest 66 test-core-build-process-macos: 67 name: Core running from ${{ matrix.directory }} 68 uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk 131 69 permissions: 132 70 contents: read 133 timeout-minutes: 30134 71 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 135 steps: 136 - name: Checkout repository 137 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 138 139 - name: Set up Node.js 140 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 141 with: 142 node-version-file: '.nvmrc' 143 cache: npm 144 145 - name: Log debug information 146 run: | 147 npm --version 148 node --version 149 curl --version 150 git --version 151 svn --version 152 153 - name: Install npm Dependencies 154 run: npm ci 155 156 - name: Build WordPress in /src 157 run: npm run build:dev 158 159 - name: Clean after building in /src 160 run: npm run grunt clean -- --dev 161 162 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 163 run: git diff --exit-code 164 165 - name: Build WordPress 166 run: npm run build 167 168 - name: Clean after building 169 run: npm run grunt clean 170 171 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 172 run: git diff --exit-code 72 strategy: 73 fail-fast: false 74 matrix: 75 os: [ macos-13 ] 76 directory: [ 'src', 'build' ] 77 with: 78 os: ${{ matrix.os }} 79 directory: ${{ matrix.directory }} 80 test-emoji: false 173 81 174 82 slack-notifications: … … 178 86 actions: read 179 87 contents: read 180 needs: [ test- npm, test-npm-macos ]88 needs: [ test-core-build-process, test-core-build-process-macos ] 181 89 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 182 90 with: 183 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' }}91 calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} 184 92 secrets: 185 93 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} … … 193 101 permissions: 194 102 actions: write 195 needs: [ test-npm, test-npm-macos,slack-notifications ]103 needs: [ slack-notifications ] 196 104 if: | 197 105 always() && … … 200 108 github.run_attempt < 2 && 201 109 ( 202 needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure'||203 needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure'110 contains( needs.*.result, 'cancelled' ) || 111 contains( needs.*.result, 'failure' ) 204 112 ) 205 113 206 114 steps: 207 115 - name: Dispatch workflow run 208 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.0116 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 209 117 with: 210 118 retries: 2 -
branches/6.3/docker-compose.yml
r54096 r58300 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.3/tools/local-env/scripts/docker.js
r54096 r58300 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.3/tools/local-env/scripts/install.js
r56042 r58300 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.3/tools/local-env/scripts/start.js
r55473 r58300 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.