Skip to content

Commit

Permalink
Merge branch 'trunk' into 56791-coding-standards
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyBiryukov authored Feb 1, 2025
2 parents 0eebf08 + bb07250 commit 2ea803b
Show file tree
Hide file tree
Showing 74 changed files with 6,089 additions and 1,529 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,20 @@ updates:
github-actions:
patterns:
- "*"

# Check for updates to Composer packages.
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
ignore:
# These dependencies do not currently need to be managed with Dependabot.
- dependency-name: "squizlabs/php_codesniffer"
- dependency-name: "wp-coding-standards/wpcs"
- dependency-name: "phpcompatibility/php-compatibility"
- dependency-name: "yoast/phpunit-polyfills"
groups:
composer-packages:
patterns:
- "composer/ca-bundle"
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ phpcs, jshint, slack-notifications ]
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ on:
- trunk
- '5.[3-9]'
- '[6-9].[0-9]'
paths:
# Any change to a PHP, CSS, or JavaScript file should run checks.
- '**.css'
- '**.js'
- '**.php'
# These files configure npm and the task runner. Changes could affect the outcome.
- 'package*.json'
- 'Gruntfile.js'
- 'webpack.config.js'
- 'tools/webpack/**'
# These files configure Composer. Changes could affect the outcome.
- 'composer.*'
# This files affect the e2e tests. Changes could affect the outcome.
- 'tests/e2e/**'
# Confirm any changes to relevant workflow files.
- '.github/workflows/end-to-end-tests.yml'
- '.github/workflows/reusable-end-to-end-tests-*.yml'
workflow_dispatch:

# Cancels all previous workflow runs for pull requests that have not completed.
Expand Down Expand Up @@ -67,7 +84,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ e2e-tests, slack-notifications ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/failed-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# - Restarts all failed jobs when the workflow fails or is cancelled for the first time.
failed-workflow:
name: Rerun a workflow
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
timeout-minutes: 30
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
php: ${{ fromJSON( needs.build-test-matrix.outputs.php-versions ) }}
db-type: [ 'mysql' ]
db-version: ${{ fromJSON( needs.build-test-matrix.outputs.mysql-versions ) }}
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
steps:
- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
with:
php-version: '${{ matrix.php }}'
coverage: none
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/javascript-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ on:
paths:
# Any change to a JavaScript file should run tests.
- '**.js'
# These files configure npm. Changes could affect the outcome.
# These files configure npm and the task runner. Changes could affect the outcome.
- 'package*.json'
- 'Gruntfile.js'
- 'webpack.config.js'
- 'tools/webpack/**'
# This file configures ESLint. Changes could affect the outcome.
- '.eslintignore'
# This file configures JSHint. Changes could affect the outcome.
Expand Down Expand Up @@ -70,7 +73,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/local-docker-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ on:
- 'docker-compose.yml'
# Any changes to local environment related files
- 'tools/local-env/**'
# These files manage packages used by the local environment.
# These files configure npm and the task runner. Changes could affect the outcome.
- 'package*.json'
- 'Gruntfile.js'
- 'webpack.config.js'
- 'tools/webpack/**'
# These files configure Composer. Changes could affect the local environment.
- 'composer.*'
# These files define the versions to test.
Expand All @@ -33,8 +36,11 @@ on:
- 'docker-compose.yml'
# Any changes to local environment related files
- 'tools/local-env/**'
# These files manage packages used by the local environment.
# These files configure npm and the task runner. Changes could affect the outcome.
- 'package*.json'
- 'Gruntfile.js'
- 'webpack.config.js'
- 'tools/webpack/**'
# These files configure Composer. Changes could affect the local environment.
- 'composer.*'
# These files define the versions to test.
Expand Down Expand Up @@ -82,7 +88,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
memcached: [ false, true ]
php: ${{ fromJSON( needs.build-test-matrix.outputs.php-versions ) }}
db-version: ${{ fromJSON( needs.build-test-matrix.outputs.mysql-versions ) }}
Expand Down Expand Up @@ -123,7 +129,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ build-test-matrix, environment-tests-mysql, slack-notifications ]
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ on:
- trunk
- '6.[2-9]'
- '[7-9].[0-9]'
paths:
# Any change to a PHP, CSS, or JavaScript file should run checks.
- '**.css'
- '**.js'
- '**.php'
# These files configure npm and the task runner. Changes could affect the outcome.
- 'package*.json'
- 'Gruntfile.js'
- 'webpack.config.js'
- 'tools/webpack/**'
# These files configure Composer. Changes could affect the outcome.
- 'composer.*'
# This files affect the performance tests. Changes could affect the outcome.
- 'tests/performance/**'
# Confirm any changes to relevant workflow files.
- '.github/workflows/performance.yml'
- '.github/workflows/reusable-performance.yml'
workflow_dispatch:

# Cancels all previous workflow runs for pull requests that have not completed.
Expand Down Expand Up @@ -66,7 +83,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/php-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]
Expand Down
41 changes: 30 additions & 11 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ on:
- trunk
- '3.[7-9]'
- '[4-9].[0-9]'
paths:
# Any change to a PHP, CSS, JavaScript, JSON, HTML, or otherwise tested file should run checks.
- '**.css'
- '**.html'
- '**.js'
- '**.json'
- '**.php'
- 'src/license.txt'
- 'src/SECURITY.md'
# These files configure npm and the task runner. Changes could affect the outcome.
- 'package*.json'
- 'Gruntfile.js'
# These files configure Composer. Changes could affect the outcome.
- 'composer.*'
# This files affect the phpunit tests. Changes could affect the outcome.
- 'tests/phpunit/**'
# Confirm any changes to relevant workflow files.
- '.github/workflows/phpunit-tests.yml'
- '.github/workflows/reusable-phpunit-tests-*.yml'
workflow_dispatch:
# Once weekly On Sundays at 00:00 UTC.
schedule:
Expand Down Expand Up @@ -44,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4' ]
Expand All @@ -54,37 +73,37 @@ jobs:

include:
# Include jobs that test with memcached.
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.3'
db-type: 'mysql'
db-version: '8.4'
tests-domain: 'example.org'
multisite: false
memcached: true
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.3'
db-type: 'mysql'
db-version: '8.4'
tests-domain: 'example.org'
multisite: true
memcached: true
# Include jobs with a port on the test domain for both single and multisite.
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.4'
db-type: 'mysql'
db-version: '8.4'
tests-domain: 'example.org:8889'
multisite: false
memcached: false
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.4'
db-type: 'mysql'
db-version: '8.4'
tests-domain: 'example.org:8889'
multisite: true
memcached: false
# Report test results to the Host Test Results.
- os: ubuntu-latest
- os: ubuntu-24.04
db-type: 'mysql'
db-version: '8.4'
tests-domain: 'example.org'
Expand Down Expand Up @@ -115,7 +134,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mariadb' ]
db-version: [ '5.5', '10.3', '10.4', '10.5', '10.6', '10.11', '11.4' ]
Expand All @@ -124,13 +143,13 @@ jobs:

include:
# Include jobs that test with memcached.
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.3'
db-type: 'mariadb'
db-version: '11.4'
multisite: false
memcached: true
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.3'
db-type: 'mariadb'
db-version: '11.4'
Expand Down Expand Up @@ -165,7 +184,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql', 'mariadb' ]
db-version: [ '9.1', '11.6' ]
Expand Down Expand Up @@ -236,7 +255,7 @@ jobs:

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/props-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
# - Removes the props-bot label, if necessary.
props-bot:
name: Generate a list of props
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
# The action needs permission `write` permission for PRs in order to add a comment.
pull-requests: write
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull-request-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions: {}
jobs:
# Comments on a pull request when the author is a first time contributor.
post-welcome-message:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
# Leaves a comment on a pull request with a link to test the changes in a WordPress Playground instance.
playground-details:
name: Comment on a pull request with Playground details
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
# Manages comments reminding contributors to include a Trac ticket link when opening a pull request.
trac-ticket-check:
name: Manage Trac ticket reminders for pull requests
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-cleanup-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# - Leaves a comment on each PR before closing.
close-prs:
name: Find and close PRs
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
pull-requests: write

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable-coding-standards-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ jobs:
# - Ensures version-controlled files are not modified or deleted.
jshint:
name: Run coding standards checks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 20

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down
Loading

0 comments on commit 2ea803b

Please sign in to comment.