Changeset 55482
- Timestamp:
- 03/07/2023 07:36:29 PM (23 months ago)
- Location:
- branches/6.0
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.0/.env
r53071 r55482 36 36 # Defaults to 5.7 with the assumption that LOCAL_DB_TYPE is set to `mysql` above. 37 37 # 38 # When using `mysql`, see https://hub.docker.com/ _/mysql/for valid versions.39 # When using `mariadb`, see https://hub.docker.com/ _/mariadb for valid versions.38 # When using `mysql`, see https://hub.docker.com/r/amd64/mysql for valid versions. 39 # When using `mariadb`, see https://hub.docker.com/r/amd64/mariadb for valid versions. 40 40 ## 41 41 LOCAL_DB_VERSION=5.7 -
branches/6.0/.github/workflows/coding-standards.yml
r53595 r55482 21 21 - '**.js' 22 22 - '**.php' 23 # These files configure NPM. Changes could affect the outcome.23 # These files configure npm. Changes could affect the outcome. 24 24 - 'package*.json' 25 25 # These files configure Composer. Changes could affect the outcome. … … 48 48 # - Checks out the repository. 49 49 # - Sets up PHP. 50 # - Logs debug information.51 50 # - Configures caching for PHPCS scans. 52 # - Installs Composer dependencies (use cache if possible).51 # - Installs Composer dependencies. 53 52 # - Make Composer packages available globally. 54 # - Logs PHP_CodeSniffer debug information.55 53 # - Runs PHPCS on the full codebase with warnings suppressed. 54 # - Generate a report for displaying issues as pull request annotations. 56 55 # - Runs PHPCS on the `tests` directory without warnings suppressed. 56 # - Generate a report for displaying `test` directory issues as pull request annotations. 57 57 # - Ensures version-controlled files are not modified or deleted. 58 58 phpcs: … … 64 64 steps: 65 65 - name: Checkout repository 66 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.266 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 67 67 68 68 - name: Set up PHP 69 uses: shivammathur/setup-php@ 3eda58347216592f618bb1dff277810b6698e4ca # v2.19.169 uses: shivammathur/setup-php@8e2ac35f639d3e794c1da1f28999385ab6fdf0fc # v2.23.0 70 70 with: 71 71 php-version: '7.4' 72 72 coverage: none 73 tools: composer, cs2pr 74 75 - name: Log debug information 76 run: | 77 php --version 78 composer --version 73 tools: cs2pr 79 74 80 75 # This date is used to ensure that the PHPCS cache is cleared at least once every week. … … 82 77 - name: "Get last Monday's date" 83 78 id: get-date 84 run: echo " ::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")"79 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT 85 80 86 81 - name: Cache PHPCS scan cache 87 uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4 88 with: 89 path: .cache/phpcs.json 82 uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3.2.3 83 with: 84 path: | 85 .cache/phpcs-src.json 86 .cache/phpcs-tests.json 90 87 key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }} 91 88 89 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 90 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 92 91 - name: Install Composer dependencies 93 uses: ramsey/composer-install@ f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.094 with: 95 c omposer-options: "--no-progress --no-ansi --no-interaction"92 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 93 with: 94 custom-cache-suffix: ${{ steps.get-date.outputs.date }} 96 95 97 96 - name: Make Composer packages available globally 98 97 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 99 98 100 - name: Log PHPCS debug information101 run: phpcs -i102 103 99 - name: Run PHPCS on all Core files 104 run: phpcs -q -n --report=checkstyle | cs2pr 100 id: phpcs-core 101 run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml 102 103 - name: Show PHPCS results in PR 104 if: ${{ always() && steps.phpcs-core.outcome == 'failure' }} 105 run: cs2pr ./.cache/phpcs-report.xml 105 106 106 107 - name: Check test suite files for warnings 107 run: phpcs tests -q --report=checkstyle | cs2pr 108 id: phpcs-tests 109 run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml 110 111 - name: Show test suite scan results in PR 112 if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }} 113 run: cs2pr ./.cache/phpcs-tests-report.xml 108 114 109 115 - name: Ensure version-controlled files are not modified during the tests … … 116 122 # Performs the following steps: 117 123 # - Checks out the repository. 124 # - Sets up Node.js. 118 125 # - Logs debug information about the GitHub Action runner. 119 # - Installs NodeJS. 120 # - Logs updated debug information. 121 # _ Installs NPM dependencies. 126 # - Installs npm dependencies. 122 127 # - Run the WordPress JSHint checks. 123 128 # - Ensures version-controlled files are not modified or deleted. … … 132 137 steps: 133 138 - name: Checkout repository 134 uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 139 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 140 141 - name: Set up Node.js 142 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 143 with: 144 node-version-file: '.nvmrc' 145 cache: npm 135 146 136 147 - name: Log debug information … … 141 152 svn --version 142 153 143 - name: Install NodeJS 144 uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 145 with: 146 node-version-file: '.nvmrc' 147 cache: npm 148 149 - name: Log debug information 150 run: | 151 npm --version 152 node --version 153 154 - name: Install Dependencies 154 - name: Install npm Dependencies 155 155 run: npm ci 156 156 … … 173 173 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 174 174 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 175 176 failed-workflow: 177 name: Failed workflow tasks 178 runs-on: ubuntu-latest 179 needs: [ phpcs, jshint, slack-notifications ] 180 if: | 181 always() && 182 github.repository == 'WordPress/wordpress-develop' && 183 github.event_name != 'pull_request' && 184 github.run_attempt < 2 && 185 ( 186 needs.phpcs.result == 'cancelled' || needs.phpcs.result == 'failure' || 187 needs.jshint.result == 'cancelled' || needs.jshint.result == 'failure' 188 ) 189 190 steps: 191 - name: Dispatch workflow run 192 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 193 with: 194 retries: 2 195 retry-exempt-status-codes: 418 196 script: | 197 github.rest.actions.createWorkflowDispatch({ 198 owner: context.repo.owner, 199 repo: context.repo.repo, 200 workflow_id: 'failed-workflow.yml', 201 ref: 'trunk', 202 inputs: { 203 run_id: '${{ github.run_id }}' 204 } 205 }); -
branches/6.0/.github/workflows/end-to-end-tests.yml
r53595 r55482 34 34 # - Sets environment variables. 35 35 # - Checks out the repository. 36 # - Sets up Node.js. 36 37 # - Logs debug information about the GitHub Action runner. 37 # - Installs NodeJS. 38 # _ Installs NPM dependencies. 38 # - Installs npm dependencies. 39 39 # - Builds WordPress to run from the `build` directory. 40 40 # - Starts the WordPress Docker container. 41 # - Logs general debug information.42 41 # - Logs the running Docker containers. 43 42 # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container). … … 58 57 59 58 - name: Checkout repository 60 uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 59 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 60 61 - name: Set up Node.js 62 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 63 with: 64 node-version-file: '.nvmrc' 65 cache: npm 61 66 62 67 - name: Log debug information … … 67 72 git --version 68 73 svn --version 69 php --version70 php -i71 74 locale -a 72 75 73 - name: Install NodeJS 74 uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 75 with: 76 node-version-file: '.nvmrc' 77 cache: npm 78 79 - name: Install Dependencies 76 - name: Install npm Dependencies 80 77 run: npm ci 81 78 … … 86 83 run: | 87 84 npm run env:start 88 89 - name: General debug information90 run: |91 npm --version92 node --version93 curl --version94 git --version95 svn --version96 85 97 86 - name: Log running Docker containers … … 129 118 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 130 119 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 120 121 failed-workflow: 122 name: Failed workflow tasks 123 runs-on: ubuntu-latest 124 needs: [ e2e-tests, slack-notifications ] 125 if: | 126 always() && 127 github.repository == 'WordPress/wordpress-develop' && 128 github.event_name != 'pull_request' && 129 github.run_attempt < 2 && 130 ( 131 needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure' 132 ) 133 134 steps: 135 - name: Dispatch workflow run 136 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 137 with: 138 retries: 2 139 retry-exempt-status-codes: 418 140 script: | 141 github.rest.actions.createWorkflowDispatch({ 142 owner: context.repo.owner, 143 repo: context.repo.repo, 144 workflow_id: 'failed-workflow.yml', 145 ref: 'trunk', 146 inputs: { 147 run_id: '${{ github.run_id }}' 148 } 149 }); -
branches/6.0/.github/workflows/javascript-tests.yml
r53595 r55482 19 19 # Any change to a JavaScript file should run tests. 20 20 - '**.js' 21 # These files configure NPM. Changes could affect the outcome.21 # These files configure npm. Changes could affect the outcome. 22 22 - 'package*.json' 23 23 # This file configures ESLint. Changes could affect the outcome. … … 43 43 # Performs the following steps: 44 44 # - Checks out the repository. 45 # - Sets up Node.js. 45 46 # - Logs debug information about the GitHub Action runner. 46 # - Installs NodeJS. 47 # - Logs updated debug information. 48 # _ Installs NPM dependencies. 47 # - Installs npm dependencies. 49 48 # - Run the WordPress QUnit tests. 50 49 # - Ensures version-controlled files are not modified or deleted. … … 57 56 steps: 58 57 - name: Checkout repository 59 uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 58 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 59 60 - name: Set up Node.js 61 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 62 with: 63 node-version-file: '.nvmrc' 64 cache: npm 60 65 61 66 - name: Log debug information … … 66 71 svn --version 67 72 68 - name: Install NodeJS 69 uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 70 with: 71 node-version-file: '.nvmrc' 72 cache: npm 73 74 - name: Log debug information 75 run: | 76 npm --version 77 node --version 78 79 - name: Install Dependencies 73 - name: Install npm Dependencies 80 74 run: npm ci 81 75 … … 98 92 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 99 93 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 94 95 failed-workflow: 96 name: Failed workflow tasks 97 runs-on: ubuntu-latest 98 needs: [ test-js, slack-notifications ] 99 if: | 100 always() && 101 github.repository == 'WordPress/wordpress-develop' && 102 github.event_name != 'pull_request' && 103 github.run_attempt < 2 && 104 ( 105 needs.test-js.result == 'cancelled' || needs.test-js.result == 'failure' 106 ) 107 108 steps: 109 - name: Dispatch workflow run 110 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 111 with: 112 retries: 2 113 retry-exempt-status-codes: 418 114 script: | 115 github.rest.actions.createWorkflowDispatch({ 116 owner: context.repo.owner, 117 repo: context.repo.repo, 118 workflow_id: 'failed-workflow.yml', 119 ref: 'trunk', 120 inputs: { 121 run_id: '${{ github.run_id }}' 122 } 123 }); -
branches/6.0/.github/workflows/php-compatibility.yml
r53595 r55482 45 45 # - Logs debug information. 46 46 # - Configures caching for PHP compatibility scans. 47 # - Installs Composer dependencies (use cache if possible).47 # - Installs Composer dependencies. 48 48 # - Make Composer packages available globally. 49 # - Logs PHP_CodeSniffer debug information.50 49 # - Runs the PHP compatibility tests. 50 # - Generate a report for displaying issues as pull request annotations. 51 51 # - Ensures version-controlled files are not modified or deleted. 52 52 php-compatibility: … … 58 58 steps: 59 59 - name: Checkout repository 60 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.260 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 61 61 62 62 - name: Set up PHP 63 uses: shivammathur/setup-php@ 3eda58347216592f618bb1dff277810b6698e4ca # v2.19.163 uses: shivammathur/setup-php@8e2ac35f639d3e794c1da1f28999385ab6fdf0fc # v2.23.0 64 64 with: 65 65 php-version: '7.4' 66 66 coverage: none 67 tools: c omposer, cs2pr67 tools: cs2pr 68 68 69 69 - name: Log debug information 70 70 run: | 71 php --version72 71 composer --version 73 72 … … 76 75 - name: "Get last Monday's date" 77 76 id: get-date 78 run: echo " ::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")"77 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT 79 78 80 79 - name: Cache PHP compatibility scan cache 81 uses: actions/cache@ c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.480 uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3.2.3 82 81 with: 83 82 path: .cache/phpcompat.json 84 83 key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }} 85 84 85 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 86 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 86 87 - name: Install Composer dependencies 87 uses: ramsey/composer-install@ f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.088 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 88 89 with: 89 c omposer-options: "--no-progress --no-ansi --no-interaction"90 custom-cache-suffix: ${{ steps.get-date.outputs.date }} 90 91 91 92 - name: Make Composer packages available globally 92 93 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 93 94 94 - name: Log PHPCS debug information 95 run: phpcs -i 95 - name: Run PHP compatibility tests 96 id: phpcs 97 run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml 96 98 97 - name: Run PHP compatibility tests 98 run: phpcs --standard=phpcompat.xml.dist -q --report=checkstyle | cs2pr 99 - name: Show PHPCompatibility results in PR 100 if: ${{ always() && steps.phpcs.outcome == 'failure' }} 101 run: cs2pr ./.cache/phpcs-compat-report.xml 99 102 100 103 - name: Ensure version-controlled files are not modified or deleted … … 113 116 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 114 117 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 118 119 failed-workflow: 120 name: Failed workflow tasks 121 runs-on: ubuntu-latest 122 needs: [ php-compatibility, slack-notifications ] 123 if: | 124 always() && 125 github.repository == 'WordPress/wordpress-develop' && 126 github.event_name != 'pull_request' && 127 github.run_attempt < 2 && 128 ( 129 needs.php-compatibility.result == 'cancelled' || needs.php-compatibility.result == 'failure' 130 ) 131 132 steps: 133 - name: Dispatch workflow run 134 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 135 with: 136 retries: 2 137 retry-exempt-status-codes: 418 138 script: | 139 github.rest.actions.createWorkflowDispatch({ 140 owner: context.repo.owner, 141 repo: context.repo.repo, 142 workflow_id: 'failed-workflow.yml', 143 ref: 'trunk', 144 inputs: { 145 run_id: '${{ github.run_id }}' 146 } 147 }); -
branches/6.0/.github/workflows/phpunit-tests.yml
r53595 r55482 40 40 # Performs the following steps: 41 41 # - Sets environment variables. 42 # - Sets up the environment variables needed for testing with memcached (if desired). 43 # - Installs NodeJS. 44 # - Installs NPM dependencies 45 # - Configures caching for Composer. 42 # - Checks out the repository. 43 # - Sets up Node.js. 44 # - Sets up PHP. 46 45 # - Installs Composer dependencies. 46 # - Installs npm dependencies 47 # - Logs general debug information about the runner. 47 48 # - Logs Docker debug information (about the Docker installation within the runner). 48 49 # - Starts the WordPress Docker container. 49 # - Starts the Memcached server after the Docker network has been created (if desired).50 # - Logs general debug information about the runner.51 50 # - Logs the running Docker containers. 52 # - Logs debug information from inside the WordPress Docker container.53 51 # - Logs debug information about what's installed within the WordPress Docker containers. 54 52 # - Install WordPress within the Docker container. … … 56 54 # - Ensures version-controlled files are not modified or deleted. 57 55 # - Checks out the WordPress Test reporter repository. 58 # - Reconnect the directory to the Git repository.59 56 # - Submit the test results to the WordPress.org host test results. 60 57 test-php: … … 111 108 112 109 - name: Checkout repository 113 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2114 115 - name: Install NodeJS116 uses: actions/setup-node@ eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0110 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 111 112 - name: Set up Node.js 113 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 117 114 with: 118 115 node-version-file: '.nvmrc' 119 116 cache: npm 120 117 121 - name: Install Dependencies 118 ## 119 # This allows Composer dependencies to be installed using a single step. 120 # 121 # Since the tests are currently run within the Docker containers where the PHP version varies, 122 # the same PHP version needs to be configured for the action runner machine so that the correct 123 # dependency versions are installed and cached. 124 ## 125 - name: Set up PHP 126 uses: shivammathur/setup-php@8e2ac35f639d3e794c1da1f28999385ab6fdf0fc # v2.23.0 127 with: 128 php-version: '${{ matrix.php }}' 129 coverage: none 130 131 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 132 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 133 - name: Install Composer dependencies 134 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 135 with: 136 custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") 137 138 - name: Install npm dependencies 122 139 run: npm ci 123 124 # This date is used to ensure that the Composer cache is refreshed at least once every week.125 # http://man7.org/linux/man-pages/man1/date.1.html126 - name: "Get last Monday's date"127 id: get-date128 run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")"129 130 - name: Get Composer cache directory131 id: composer-cache132 run: echo "::set-output name=dir::$(composer config cache-files-dir)"133 134 - name: Cache Composer dependencies135 uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4136 env:137 cache-name: cache-composer-dependencies138 with:139 path: ${{ steps.composer-cache.outputs.dir }}140 key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }}141 142 - name: Install Composer dependencies143 run: |144 docker-compose run --rm php composer --version145 146 # Install using `composer update` as there is no `composer.lock` file.147 if [ ${{ env.LOCAL_PHP }} == '8.1-fpm' ]; then148 docker-compose run --rm php composer update --ignore-platform-reqs149 else150 docker-compose run --rm php composer update151 fi152 153 - name: Docker debug information154 run: |155 docker -v156 docker-compose -v157 158 - name: Start Docker environment159 run: |160 npm run env:start161 162 # The memcached server needs to start after the Docker network has been set up with `npm run env:start`.163 - name: Start the Memcached server.164 if: ${{ matrix.memcached }}165 run: |166 cp tests/phpunit/includes/object-cache.php src/wp-content/object-cache.php167 docker run --name memcached --net $(basename "$PWD")_wpdevnet -d memcached168 140 169 141 - name: General debug information … … 174 146 git --version 175 147 svn --version 148 composer --version 149 locale -a 150 151 - name: Docker debug information 152 run: | 153 docker -v 154 docker-compose -v 155 156 - name: Start Docker environment 157 run: | 158 npm run env:start 176 159 177 160 - name: Log running Docker containers … … 232 215 - name: Checkout the WordPress Test Reporter 233 216 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} 234 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2217 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 235 218 with: 236 219 repository: 'WordPress/phpunit-test-runner' … … 255 238 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 256 239 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 240 241 failed-workflow: 242 name: Failed workflow tasks 243 runs-on: ubuntu-latest 244 needs: [ test-php, slack-notifications ] 245 if: | 246 always() && 247 github.repository == 'WordPress/wordpress-develop' && 248 github.event_name != 'pull_request' && 249 github.run_attempt < 2 && 250 ( 251 needs.test-php.result == 'cancelled' || needs.test-php.result == 'failure' 252 ) 253 254 steps: 255 - name: Dispatch workflow run 256 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 257 with: 258 retries: 2 259 retry-exempt-status-codes: 418 260 script: | 261 github.rest.actions.createWorkflowDispatch({ 262 owner: context.repo.owner, 263 repo: context.repo.repo, 264 workflow_id: 'failed-workflow.yml', 265 ref: 'trunk', 266 inputs: { 267 run_id: '${{ github.run_id }}' 268 } 269 }); -
branches/6.0/.github/workflows/test-coverage.yml
r53112 r55482 90 90 - name: "Get last Monday's date" 91 91 id: get-date 92 run: echo " ::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")"92 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT 93 93 94 94 - name: Get Composer cache directory 95 95 id: composer-cache 96 run: echo " ::set-output name=dir::$(composer config cache-files-dir)"96 run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT 97 97 98 98 - name: Cache Composer dependencies … … 101 101 cache-name: cache-composer-dependencies 102 102 with: 103 path: ${{ steps.composer-cache.outputs. dir }}103 path: ${{ steps.composer-cache.outputs.composer_dir }} 104 104 key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }} 105 105 … … 182 182 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 183 183 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 184 185 failed-workflow: 186 name: Failed workflow tasks 187 runs-on: ubuntu-latest 188 needs: [ test-coverage-report, slack-notifications ] 189 if: | 190 always() && 191 github.repository == 'WordPress/wordpress-develop' && 192 github.event_name != 'pull_request' && 193 github.run_attempt < 2 && 194 ( 195 needs.test-coverage-report.result == 'cancelled' || needs.test-coverage-report.result == 'failure' 196 ) 197 198 steps: 199 - name: Dispatch workflow run 200 uses: actions/github-script@d4560e157075e2d93aa3022b5b51a42a880f1f93 # v6.3.0 201 with: 202 retries: 2 203 retry-exempt-status-codes: 418 204 script: | 205 github.rest.actions.createWorkflowDispatch({ 206 owner: context.repo.owner, 207 repo: context.repo.repo, 208 workflow_id: 'failed-workflow.yml', 209 ref: 'trunk', 210 inputs: { 211 run_id: '${{ github.run_id }}' 212 } 213 }); -
branches/6.0/.github/workflows/test-npm.yml
r53738 r55482 1 name: Test NPM1 name: Test npm 2 2 3 3 on: … … 16 16 - '[4-9].[0-9]' 17 17 paths: 18 # These files configure NPM. Changes could affect the outcome.18 # These files configure npm. Changes could affect the outcome. 19 19 - 'package*.json' 20 # JavaScript files are built using NPM.20 # JavaScript files are built using npm. 21 21 - '**.js' 22 # CSS and SCSS files are built using NPM.22 # CSS and SCSS files are built using npm. 23 23 - '**.scss' 24 24 - '**.css' … … 38 38 39 39 jobs: 40 # Verifies that installing NPMdependencies and building WordPress works as expected.40 # Verifies that installing npm dependencies and building WordPress works as expected. 41 41 # 42 42 # Performs the following steps: 43 43 # - Checks out the repository. 44 # - Sets up Node.js. 44 45 # - Logs debug information about the GitHub Action runner. 45 # - Installs NodeJS. 46 # _ Installs NPM dependencies. 46 # - Installs npm dependencies. 47 47 # - Builds WordPress to run from the `build` directory. 48 48 # - Cleans up after building WordPress to the `build` directory. … … 52 52 # - Ensures version-controlled files are not modified or deleted. 53 53 test-npm: 54 name: Test NPMon ${{ matrix.os }}54 name: Test npm on ${{ matrix.os }} 55 55 runs-on: ${{ matrix.os }} 56 56 timeout-minutes: 20 … … 63 63 steps: 64 64 - name: Checkout repository 65 uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 65 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 66 67 - name: Set up Node.js 68 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 69 with: 70 node-version-file: '.nvmrc' 71 cache: npm 66 72 67 73 - name: Log debug information … … 73 79 svn --version 74 80 75 - name: Install NodeJS 76 uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 81 - name: Install npm Dependencies 82 run: npm ci 83 84 - name: Build WordPress in /src 85 run: npm run build:dev 86 87 - name: Clean after building in /src 88 run: npm run grunt clean -- --dev 89 90 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 91 run: git diff --exit-code 92 93 - name: Build WordPress 94 run: npm run build 95 96 - name: Clean after building 97 run: npm run grunt clean 98 99 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 100 run: git diff --exit-code 101 102 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 103 # 104 # This is separate from the job above in order to use stricter conditions about when to run. 105 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 106 # 107 # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is 108 # currently no way to determine the OS being used on a given job. 109 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 110 # 111 # Performs the following steps: 112 # - Checks out the repository. 113 # - Sets up Node.js. 114 # - Logs debug information about the GitHub Action runner. 115 # - Installs npm dependencies. 116 # - Builds WordPress to run from the `build` directory. 117 # - Cleans up after building WordPress to the `build` directory. 118 # - Ensures version-controlled files are not modified or deleted. 119 # - Builds WordPress to run from the `src` directory. 120 # - Cleans up after building WordPress to the `src` directory. 121 # - Ensures version-controlled files are not modified or deleted. 122 test-npm-macos: 123 name: Test npm on MacOS 124 runs-on: macos-latest 125 timeout-minutes: 30 126 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 127 steps: 128 - name: Checkout repository 129 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 130 131 - name: Set up Node.js 132 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 77 133 with: 78 134 node-version-file: '.nvmrc' 79 135 cache: npm 80 81 - name: Install Dependencies82 run: npm ci83 84 - name: Build WordPress85 run: npm run build86 87 - name: Clean after building88 run: npm run grunt clean89 90 - name: Ensure version-controlled files are not modified or deleted during building and cleaning91 run: git diff --exit-code92 93 - name: Build WordPress in /src94 run: npm run build:dev95 96 - name: Clean after building in /src97 run: npm run grunt clean -- --dev98 99 - name: Ensure version-controlled files are not modified or deleted during building and cleaning100 run: git diff --exit-code101 102 # Verifies that installing NPM dependencies and building WordPress works as expected on MacOS.103 #104 # This is separate from the job above in order to use stricter conditions about when to run.105 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate.106 #107 # Performs the following steps:108 # - Checks out the repository.109 # - Logs debug information about the GitHub Action runner.110 # - Installs NodeJS.111 # _ Installs NPM dependencies.112 # - Builds WordPress to run from the `build` directory.113 # - Cleans up after building WordPress to the `build` directory.114 # - Ensures version-controlled files are not modified or deleted.115 # - Builds WordPress to run from the `src` directory.116 # - Cleans up after building WordPress to the `src` directory.117 # - Ensures version-controlled files are not modified or deleted.118 test-npm-macos:119 name: Test NPM on MacOS120 runs-on: macos-latest121 timeout-minutes: 20122 if: ${{ github.repository == 'WordPress/wordpress-develop' }}123 steps:124 - name: Checkout repository125 uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2126 136 127 137 - name: Log debug information … … 133 143 svn --version 134 144 135 - name: Install NodeJS 136 uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 137 with: 138 node-version-file: '.nvmrc' 139 cache: npm 140 141 - name: Install Dependencies 145 - name: Install npm Dependencies 142 146 run: npm ci 147 148 - name: Build WordPress in /src 149 run: npm run build:dev 150 151 - name: Clean after building in /src 152 run: npm run grunt clean -- --dev 153 154 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 155 run: git diff --exit-code 143 156 144 157 - name: Build WordPress … … 147 160 - name: Clean after building 148 161 run: npm run grunt clean 149 150 - name: Ensure version-controlled files are not modified or deleted during building and cleaning151 run: git diff --exit-code152 153 - name: Build WordPress in /src154 run: npm run build:dev155 156 - name: Clean after building in /src157 run: npm run grunt clean -- --dev158 162 159 163 - name: Ensure version-controlled files are not modified or deleted during building and cleaning … … 172 176 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 173 177 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 178 179 failed-workflow: 180 name: Failed workflow tasks 181 runs-on: ubuntu-latest 182 needs: [ test-npm, test-npm-macos, slack-notifications ] 183 if: | 184 always() && 185 github.repository == 'WordPress/wordpress-develop' && 186 github.event_name != 'pull_request' && 187 github.run_attempt < 2 && 188 ( 189 needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure' || 190 needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure' 191 ) 192 193 steps: 194 - name: Dispatch workflow run 195 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 196 with: 197 retries: 2 198 retry-exempt-status-codes: 418 199 script: | 200 github.rest.actions.createWorkflowDispatch({ 201 owner: context.repo.owner, 202 repo: context.repo.repo, 203 workflow_id: 'failed-workflow.yml', 204 ref: 'trunk', 205 inputs: { 206 run_id: '${{ github.run_id }}' 207 } 208 }); -
branches/6.0/.github/workflows/welcome-new-contributors.yml
r52233 r55482 13 13 14 14 steps: 15 - uses: bubkoo/welcome-action@ 8dbbac2540d155744c90e4e37da6b05ffc9c5e2c# v1.0.315 - uses: bubkoo/welcome-action@e3f444df06502502071d309411d01ba18f916ede # v1.0.3 16 16 with: 17 17 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -
branches/6.0/docker-compose.yml
r53350 r55482 49 49 - ./:/var/www 50 50 51 # Copy or delete the Memcached dropin plugin file as appropriate. 52 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" 53 51 54 depends_on: 52 55 - mysql 56 57 # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly. 58 init: true 59 60 extra_hosts: 61 - localhost:host-gateway 53 62 54 63 ## … … 56 65 ## 57 66 mysql: 58 image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}67 image: amd64/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} 59 68 60 69 networks: … … 95 104 init: true 96 105 106 extra_hosts: 107 - localhost:host-gateway 108 109 ## 110 # The Memcached container. 111 ## 112 memcached: 113 image: memcached 114 115 networks: 116 - wpdevnet 117 118 ports: 119 - 11211:11211 120 97 121 volumes: 98 122 # So that sites aren't wiped every time containers are restarted, MySQL uses a persistent volume. -
branches/6.0/tools/local-env/scripts/docker.js
r53359 r55482 5 5 dotenvExpand.expand( dotenv.config() ); 6 6 7 if ( process.arch === 'arm64' ) {8 process.env.LOCAL_DB_TYPE = `amd64/${process.env.LOCAL_DB_TYPE}`;9 }10 11 7 // Execute any docker-compose command passed to this script. 12 8 execSync( 'docker-compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } ); -
branches/6.0/tools/local-env/scripts/install.js
r53359 r55482 6 6 7 7 dotenvExpand.expand( dotenv.config() ); 8 9 if ( process.arch === 'arm64' ) {10 process.env.LOCAL_DB_TYPE = `amd64/${process.env.LOCAL_DB_TYPE}`;11 }12 8 13 9 // Create wp-config.php. -
branches/6.0/tools/local-env/scripts/start.js
r53359 r55482 5 5 dotenvExpand.expand( dotenv.config() ); 6 6 7 if ( process.arch === 'arm64' ) {8 process.env.LOCAL_DB_TYPE = `amd64/${process.env.LOCAL_DB_TYPE}`;9 }10 11 7 // Start the local-env containers. 12 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' } ); 13 12 14 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.