Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
permissions:
contents: read
secrets: inherit
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
with:
wp-version: ${{ inputs.wp-version }}

Expand All @@ -63,7 +63,7 @@ jobs:
permissions:
contents: read
runs-on: ${{ matrix.os }}
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
timeout-minutes: 10
needs: [ build-test-matrix ]
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/local-docker-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
permissions:
contents: read
secrets: inherit
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
with:
wp-version: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}

Expand Down
68 changes: 63 additions & 5 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
permissions:
contents: read
secrets: inherit
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
permissions:
contents: read
secrets: inherit
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
permissions:
contents: read
secrets: inherit
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
permissions:
contents: read
secrets: inherit
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
strategy:
fail-fast: false
matrix:
Expand All @@ -246,13 +246,71 @@ jobs:
db-version: ${{ matrix.db-version }}
phpunit-test-groups: ${{ matrix.phpunit-test-groups }}

#
# Runs unit tests for forks.
#
# Because the majority of forks will belong to personal GitHub accounts (which are limited to just 20 concurrent jobs
# at any given time), forks only run a small subset of test combinations. This allows contributors to open pull
# requests back to their own forks for testing purposes without having to wait hours for workflow to complete.
#
limited-matrix-for-forks:
name: PHP ${{ matrix.php }}
uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
permissions:
contents: read
secrets: inherit
if: ${{ ! startsWith( github.repository, 'WordPress/' ) && github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }}
strategy:
fail-fast: false
matrix:
php: [ '7.2', '8.4' ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that this should be 7.4instead of 7.2 if #9181 lands first

db-version: [ '8.4', '11.8' ]
db-type: [ 'mysql', 'mariadb' ]
multisite: [ false ]

include:
# Include one multisite job for each database type.
- php: '8.4'
db-version: '8.4'
db-type: 'mysql'
multisite: true
- php: '8.4'
db-version: '11.8'
db-type: 'mariadb'
multisite: true
# Test with memcached.
- php: '8.4'
db-version: '8.4'
db-type: 'mysql'
multisite: true
memcached: true
# Run specific test groups once.
- php: '8.4'
db-version: '8.4'
db-type: 'mysql'
phpunit-test-groups: 'html-api-html5lib-tests'

exclude:
# Exclude PHP versions that are not supported by the database versions.
- db-type: 'mysql'
db-version: '11.8'
- db-type: 'mariadb'
db-version: '8.4'

with:
php: ${{ matrix.php }}
db-version: ${{ matrix.db-version }}
db-type: ${{ matrix.db-type }}
memcached: ${{ matrix.memcached || false }}
phpunit-test-groups: ${{ matrix.phpunit-test-groups || '' }}

slack-notifications:
name: Slack Notifications
uses: ./.github/workflows/slack-notifications.yml
permissions:
actions: read
contents: read
needs: [ test-with-mysql, test-with-mariadb, test-innovation-releases, specific-test-groups ]
needs: [ test-with-mysql, test-with-mariadb, test-innovation-releases, specific-test-groups, limited-matrix-for-forks ]
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-and-zip-default-themes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:
contents: read
needs: [ check-for-empty-files, test-build-scripts ]
timeout-minutes: 10
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
strategy:
fail-fast: false
matrix:
Expand Down
39 changes: 21 additions & 18 deletions .github/workflows/test-build-processes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ concurrency:
permissions: {}

jobs:
# Tests the WordPress Core build process on multiple operating systems.
# Tests the WordPress Core build process.
test-core-build-process:
name: Core running from ${{ matrix.directory }}
uses: ./.github/workflows/reusable-test-core-build-process.yml
Expand All @@ -55,30 +55,31 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, windows-2022 ]
os: [ 'ubuntu-24.04' ]
directory: [ 'src', 'build' ]
include:
# Only prepare artifacts for Playground once.
- os: ubuntu-24.04
- os: 'ubuntu-24.04'
directory: 'build'
save-build: true
prepare-playground: ${{ github.event_name == 'pull_request' && true || '' }}

with:
os: ${{ matrix.os }}
directory: ${{ matrix.directory }}
save-build: ${{ matrix.save-build && matrix.save-build || false }}
prepare-playground: ${{ matrix.prepare-playground && matrix.prepare-playground || false }}

# Tests the WordPress Core build process on MacOS.
# Tests the WordPress Core build process on additional operating systems.
#
# This is separate from the job above in order to use stricter conditions when determining when to run.
# This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate.
# This is separate from the job above in order to use stricter conditions when determining when to test additional
# operating systems. This avoids unintentionally consuming excessive minutes. Windows-based jobs consume minutes at a
# 2x rate, and MacOS-based jobs at a 10x rate.
# See https://docs.github.com/en/billing/concepts/product-billing/github-actions#per-minute-rates.
#
# The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is
# currently no way to determine the OS being used on a given job.
# See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
test-core-build-process-macos:
test-core-build-process-additional-os:
name: Core running from ${{ matrix.directory }}
uses: ./.github/workflows/reusable-test-core-build-process.yml
permissions:
Expand All @@ -87,37 +88,39 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-14 ]
os: [ 'macos-14', 'windows-2022' ]
directory: [ 'src', 'build' ]
with:
os: ${{ matrix.os }}
directory: ${{ matrix.directory }}

# Tests the Gutenberg plugin build process on multiple operating systems when run within a wordpress-develop checkout.
# Tests the Gutenberg plugin build process within a wordpress-develop checkout.
test-gutenberg-build-process:
name: Gutenberg running from ${{ matrix.directory }}
uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
permissions:
contents: read
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, windows-2022 ]
os: [ 'ubuntu-24.04' ]
directory: [ 'src', 'build' ]
with:
os: ${{ matrix.os }}
directory: ${{ matrix.directory }}

# Tests the Gutenberg plugin build process on MacOS when run within a wordpress-develop checkout.
# Tests the Gutenberg plugin build process on additional operating systems.
#
# This is separate from the job above in order to use stricter conditions when determining when to run.
# This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate.
# This is separate from the job above in order to use stricter conditions when determining when to test additional
# operating systems. This avoids unintentionally consuming excessive minutes. Windows-based jobs consume minutes at a
# 2x rate, and MacOS-based jobs at a 10x rate.
# See https://docs.github.com/en/billing/concepts/product-billing/github-actions#per-minute-rates.
#
# The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is
# currently no way to determine the OS being used on a given job.
# See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
test-gutenberg-build-process-macos:
test-gutenberg-build-process-additional-os:
name: Gutenberg running from ${{ matrix.directory }}
uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
permissions:
Expand All @@ -126,7 +129,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-14 ]
os: [ 'macos-14', 'windows-2022' ]
directory: [ 'src', 'build' ]
with:
os: ${{ matrix.os }}
Expand All @@ -138,7 +141,7 @@ jobs:
permissions:
actions: read
contents: read
needs: [ test-core-build-process, test-core-build-process-macos, test-gutenberg-build-process, test-gutenberg-build-process-macos ]
needs: [ test-core-build-process, test-core-build-process-additional-os, test-gutenberg-build-process, test-gutenberg-build-process-additional-os ]
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
Expand Down
33 changes: 32 additions & 1 deletion .github/workflows/upgrade-develop-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ jobs:
build:
name: Build
uses: ./.github/workflows/reusable-build-package.yml
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
permissions:
contents: read

# Run upgrade tests for the current branch.
upgrade-tests-develop:
name: Upgrade from ${{ matrix.wp }}
uses: ./.github/workflows/reusable-upgrade-testing.yml
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
needs: [ build ]
strategy:
fail-fast: false
Expand Down Expand Up @@ -83,6 +84,36 @@ jobs:
new-version: develop
multisite: ${{ matrix.multisite }}

# Run a limited set of upgrade tests for the current branch on forks.
upgrade-tests-develop-forks:
name: Upgrade from ${{ matrix.wp }}
uses: ./.github/workflows/reusable-upgrade-testing.yml
if: ${{ github.repository != 'WordPress/wordpress-develop' }}
needs: [ build ]
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '8.4' ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that this should be 7.4instead of 7.2 if #9181 lands first

db-type: [ 'mysql' ]
db-version: [ '8.4' ]
# WordPress 4.9 is the oldest version that supports PHP 7.2.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# WordPress 4.9 is the oldest version that supports PHP 7.2.

This looks like just copy paste rather than necessary based on the matrix

wp: [ '6.7', '6.8' ]
multisite: [ false, true ]

exclude:
# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '8.4'
with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
db-type: ${{ matrix.db-type }}
db-version: ${{ matrix.db-version }}
wp: ${{ matrix.wp }}
new-version: develop
multisite: ${{ matrix.multisite }}

slack-notifications:
name: Slack Notifications
uses: ./.github/workflows/slack-notifications.yml
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/upgrade-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
upgrade-tests-recent-releases:
name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
uses: ./.github/workflows/reusable-upgrade-testing.yml
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
upgrade-tests-wp-6x-mysql:
name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
uses: ./.github/workflows/reusable-upgrade-testing.yml
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
upgrade-tests-wp-5x-php-7x-mysql:
name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
uses: ./.github/workflows/reusable-upgrade-testing.yml
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
upgrade-tests-wp-5x-php-8x-mysql:
name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
uses: ./.github/workflows/reusable-upgrade-testing.yml
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
upgrade-tests-oldest-wp-mysql:
name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
uses: ./.github/workflows/reusable-upgrade-testing.yml
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
strategy:
fail-fast: false
matrix:
Expand Down
1 change: 1 addition & 0 deletions src/wp-activate.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
list( $activate_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
$activate_cookie = 'wp-activate-' . COOKIEHASH;


$key = '';
$result = null;

Expand Down
Loading