From 35873e58ac51caa6207c3a04bd6557433dfd7ebf Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 12 Aug 2025 23:53:04 +0100 Subject: [PATCH 01/10] Increase the specificity of the path filtering for workflows. --- .github/workflows/coding-standards.yml | 7 ++++--- .github/workflows/end-to-end-tests.yml | 9 +++++---- .github/workflows/javascript-tests.yml | 4 ++-- .github/workflows/performance.yml | 9 +++++---- .github/workflows/php-compatibility.yml | 4 ++-- .github/workflows/phpunit-tests.yml | 12 ++++++------ .github/workflows/test-build-processes.yml | 10 +++++----- 7 files changed, 29 insertions(+), 26 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 8f1e9fe701330..e6884139f2e27 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -14,9 +14,10 @@ on: - '3.[89]' - '[4-9].[0-9]' paths: - # Any change to a PHP or JavaScript file should run checks. - - '**.js' - - '**.php' + # Any change to a relevant PHP or JavaScript file should run checks. + - 'src/**.js' + - 'src/**.php' + - 'tests/**.php' # These files configure npm. Changes could affect the outcome. - 'package*.json' - '.npmrc' diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index d91b6512f4b49..eacdde7298d87 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -13,10 +13,11 @@ on: - '5.[3-9]' - '[6-9].[0-9]' paths: - # Any change to a PHP, CSS, or JavaScript file should run checks. - - '**.css' - - '**.js' - - '**.php' + # Any change to a source PHP, CSS, JavaScript, or JSON file should run checks. + - 'src/**.css' + - 'src/**.js' + - 'src/**.json' + - 'src/**.php' # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - '.npmrc' diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml index 8b1241038773d..75a756afb812d 100644 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -13,8 +13,8 @@ on: - '3.[89]' - '[4-9].[0-9]' paths: - # Any change to a JavaScript file should run tests. - - '**.js' + # Any change to a source JavaScript file should run tests. + - 'src/**.js' # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - '.npmrc' diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index ef02c51101557..f478e06becb82 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -13,10 +13,11 @@ on: - '6.[2-9]' - '[7-9].[0-9]' paths: - # Any change to a PHP, CSS, or JavaScript file should run checks. - - '**.css' - - '**.js' - - '**.php' + # Any change to a source PHP, CSS, JavaScript, or JSON file should run checks. + - 'src/**.css' + - 'src/**.js' + - 'src/**.json' + - 'src/**.php' # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - '.npmrc' diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml index 4bae7e0a381b0..496aadb8108f4 100644 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -13,8 +13,8 @@ on: - '5.[5-9]' - '[6-9].[0-9]' paths: - # This workflow only scans PHP files. - - '**.php' + # This workflow only scans source PHP files. + - 'src/**.php' # These files configure Composer. Changes could affect the outcome. - 'composer.*' # This file configures PHP compatibility scanning. Changes could affect the outcome. diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 45e1439c9b604..65873b98a8117 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -12,12 +12,12 @@ on: - '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' + # Any change to a source PHP, CSS, JavaScript, JSON, HTML, or otherwise tested file should run checks. + - 'src/**.css' + - 'src/**.html' + - 'src/**.js' + - 'src/**.json' + - 'src/**.php' - 'src/license.txt' - 'src/SECURITY.md' # These files configure npm and the task runner. Changes could affect the outcome. diff --git a/.github/workflows/test-build-processes.yml b/.github/workflows/test-build-processes.yml index cd32d99cacb1f..495b8b58f8ca3 100644 --- a/.github/workflows/test-build-processes.yml +++ b/.github/workflows/test-build-processes.yml @@ -12,11 +12,11 @@ on: - '3.[7-9]' - '[4-9].[0-9]' paths: - # Any change to a PHP, CSS, JavaScript, or JSON file should run checks. - - '**.css' - - '**.js' - - '**.json' - - '**.php' + # Any change to a source PHP, CSS, JavaScript, or JSON file should run checks. + - 'src/**.css' + - 'src/**.js' + - 'src/**.json' + - 'src/**.php' # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - '.npmrc' From 99547e8d25652de221b03b21e7b40c7f1084e0e8 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 12 Aug 2025 23:54:03 +0100 Subject: [PATCH 02/10] Add some missing files to the path filtering. --- .github/workflows/local-docker-environment.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/local-docker-environment.yml b/.github/workflows/local-docker-environment.yml index 856db171726b6..894aeeebd779c 100644 --- a/.github/workflows/local-docker-environment.yml +++ b/.github/workflows/local-docker-environment.yml @@ -13,6 +13,7 @@ on: - 'docker-compose.yml' # Any changes to local environment related files - 'tools/local-env/**' + - 'wp-cli.yml' # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - 'Gruntfile.js' @@ -41,6 +42,7 @@ on: - 'docker-compose.yml' # Any changes to local environment related files - 'tools/local-env/**' + - 'wp-cli.yml' # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - 'Gruntfile.js' From fe57c435275cb5a1ac34e39ed21b039824ea4647 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 14 Aug 2025 23:06:11 +0100 Subject: [PATCH 03/10] Fix some typos. --- .github/workflows/end-to-end-tests.yml | 2 +- .github/workflows/performance.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index eacdde7298d87..c937f347a2c4a 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -29,7 +29,7 @@ on: - 'tools/webpack/**' # These files configure Composer. Changes could affect the outcome. - 'composer.*' - # This files affect the e2e tests. Changes could affect the outcome. + # These 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' diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index f478e06becb82..1b99929396ecc 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -29,7 +29,7 @@ on: - 'tools/webpack/**' # These files configure Composer. Changes could affect the outcome. - 'composer.*' - # This files affect the performance tests. Changes could affect the outcome. + # These files affect the performance tests. Changes could affect the outcome. - 'tests/performance/**' # Confirm any changes to relevant workflow files. - '.github/workflows/performance.yml' From 5d5ac5e50ad42c2c333bdd1ccc37be607b91fd62 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 14 Aug 2025 23:07:04 +0100 Subject: [PATCH 04/10] Add cert files to the path filter for running the build process tests. --- .github/workflows/test-build-processes.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-build-processes.yml b/.github/workflows/test-build-processes.yml index 495b8b58f8ca3..40fe0ac60ca4a 100644 --- a/.github/workflows/test-build-processes.yml +++ b/.github/workflows/test-build-processes.yml @@ -12,11 +12,13 @@ on: - '3.[7-9]' - '[4-9].[0-9]' paths: - # Any change to a source PHP, CSS, JavaScript, or JSON file should run checks. + # Any change to a source PHP, CSS, JavaScript, JSON, or certificate file should run checks. - 'src/**.css' - 'src/**.js' - 'src/**.json' - 'src/**.php' + - 'src/**.pem' + - 'src/**.crt' # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - '.npmrc' From 086c832ae60153192cefe8eb22a5d3e9851f97de Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 3 Sep 2025 11:47:40 +0100 Subject: [PATCH 05/10] Update .github/workflows/coding-standards.yml Co-authored-by: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> --- .github/workflows/coding-standards.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index e6884139f2e27..0a9545458d62f 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -18,6 +18,7 @@ on: - 'src/**.js' - 'src/**.php' - 'tests/**.php' + - 'tests/qunit/**/*.js # These files configure npm. Changes could affect the outcome. - 'package*.json' - '.npmrc' From cea4d4ca855742ca660126323b84bb75a4cea803 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 3 Sep 2025 11:51:53 +0100 Subject: [PATCH 06/10] Fixes. --- .github/workflows/coding-standards.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 0a9545458d62f..abd8bcffc49e5 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -18,7 +18,7 @@ on: - 'src/**.js' - 'src/**.php' - 'tests/**.php' - - 'tests/qunit/**/*.js + - 'tests/qunit/**.js' # These files configure npm. Changes could affect the outcome. - 'package*.json' - '.npmrc' @@ -26,7 +26,7 @@ on: # These files configure Composer. Changes could affect the outcome. - 'composer.*' # This file configures JSHint. Changes could affect the outcome. - - '.jshintrc' + - '**.jshintrc' # This file configures PHPCS. Changes could affect the outcome. - 'phpcs.xml.dist' # Confirm any changes to relevant workflow files. From cf07dad7c787ad86bca2ee93f5ac44d13427736f Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 3 Sep 2025 11:52:22 +0100 Subject: [PATCH 07/10] Docs. --- .github/workflows/coding-standards.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index abd8bcffc49e5..30462bb2c2c23 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -25,7 +25,7 @@ on: - '.nvmrc' # These files configure Composer. Changes could affect the outcome. - 'composer.*' - # This file configures JSHint. Changes could affect the outcome. + # These files configures JSHint. Changes could affect the outcome. - '**.jshintrc' # This file configures PHPCS. Changes could affect the outcome. - 'phpcs.xml.dist' From e087ad9119f7e77bb467efcc2fa79ffd776dba71 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 3 Sep 2025 12:06:48 +0100 Subject: [PATCH 08/10] Don't exclude these workflows when PHP files in the root are changed. --- .github/workflows/coding-standards.yml | 1 + .github/workflows/end-to-end-tests.yml | 1 + .github/workflows/performance.yml | 1 + .github/workflows/phpunit-tests.yml | 1 + .github/workflows/upgrade-develop-testing.yml | 2 ++ 5 files changed, 6 insertions(+) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 30462bb2c2c23..65c9c858569e5 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -17,6 +17,7 @@ on: # Any change to a relevant PHP or JavaScript file should run checks. - 'src/**.js' - 'src/**.php' + - '*.php' # PHP files in the root, like wp-config-sample.php. - 'tests/**.php' - 'tests/qunit/**.js' # These files configure npm. Changes could affect the outcome. diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index c937f347a2c4a..4aa2a5c367931 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -18,6 +18,7 @@ on: - 'src/**.js' - 'src/**.json' - 'src/**.php' + - '*.php' # PHP files in the root, like wp-config-sample.php. # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - '.npmrc' diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 1b99929396ecc..43968fe40f527 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -18,6 +18,7 @@ on: - 'src/**.js' - 'src/**.json' - 'src/**.php' + - '*.php' # PHP files in the root, like wp-config-sample.php. # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - '.npmrc' diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 65873b98a8117..feca6b1190861 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -20,6 +20,7 @@ on: - 'src/**.php' - 'src/license.txt' - 'src/SECURITY.md' + - '*.php' # PHP files in the root, like wp-config-sample.php. # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - '.npmrc' diff --git a/.github/workflows/upgrade-develop-testing.yml b/.github/workflows/upgrade-develop-testing.yml index eb0c4ac3fdedc..5911999c7cb54 100644 --- a/.github/workflows/upgrade-develop-testing.yml +++ b/.github/workflows/upgrade-develop-testing.yml @@ -12,6 +12,7 @@ on: paths: # Any change to a source PHP file should run checks. - 'src/**.php' + - '*.php' # PHP files in the root, like wp-config-sample.php. # Confirm any changes to relevant workflow files. - '.github/workflows/upgrade-develop-testing.yml' - '.github/workflows/reusable-upgrade-testing.yml' @@ -23,6 +24,7 @@ on: paths: # Any change to a source PHP file should run checks. - 'src/**.php' + - '*.php' # PHP files in the root, like wp-config-sample.php. # Confirm any changes to relevant workflow files. - '.github/workflows/upgrade-develop-testing.yml' - '.github/workflows/reusable-upgrade-testing.yml' From 6f357296781f19ef21e68ef813518af3357057b1 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Wed, 2 Sep 2026 12:12:37 -0700 Subject: [PATCH 09/10] Update path filters after rebasing to trunk. --- .github/workflows/coding-standards.yml | 3 ++- .github/workflows/end-to-end-tests.yml | 1 + .github/workflows/performance.yml | 1 + .github/workflows/phpunit-tests.yml | 5 ++++- .github/workflows/test-build-processes.yml | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 65c9c858569e5..fcd51203b6fef 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -24,9 +24,10 @@ on: - 'package*.json' - '.npmrc' - '.nvmrc' + - 'Gruntfile.js' # These files configure Composer. Changes could affect the outcome. - 'composer.*' - # These files configures JSHint. Changes could affect the outcome. + # These files configure JSHint. Changes could affect the outcome. - '**.jshintrc' # This file configures PHPCS. Changes could affect the outcome. - 'phpcs.xml.dist' diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index 4aa2a5c367931..f393bbecf67a7 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -26,6 +26,7 @@ on: - 'Gruntfile.js' - 'webpack.config.js' - 'tools/gutenberg/**' + - 'tools/local-env/**' - 'tools/vendors/**' - 'tools/webpack/**' # These files configure Composer. Changes could affect the outcome. diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 43968fe40f527..63b013782a176 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -26,6 +26,7 @@ on: - 'Gruntfile.js' - 'webpack.config.js' - 'tools/gutenberg/**' + - 'tools/local-env/**' - 'tools/vendors/**' - 'tools/webpack/**' # These files configure Composer. Changes could affect the outcome. diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index feca6b1190861..c1075ffd9c136 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -19,13 +19,16 @@ on: - 'src/**.json' - 'src/**.php' - 'src/license.txt' - - 'src/SECURITY.md' + - 'SECURITY.md' - '*.php' # PHP files in the root, like wp-config-sample.php. # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - '.npmrc' - '.nvmrc' - 'Gruntfile.js' + # These files configure the local environment and Gutenberg assets. Changes could affect the outcome. + - 'tools/gutenberg/**' + - 'tools/local-env/**' # These files configure Composer. Changes could affect the outcome. - 'composer.*' # These files affect the phpunit tests. Changes could affect the outcome. diff --git a/.github/workflows/test-build-processes.yml b/.github/workflows/test-build-processes.yml index 40fe0ac60ca4a..440b4d05b4516 100644 --- a/.github/workflows/test-build-processes.yml +++ b/.github/workflows/test-build-processes.yml @@ -17,6 +17,7 @@ on: - 'src/**.js' - 'src/**.json' - 'src/**.php' + - '*.php' # PHP files in the root, like wp-config-sample.php. - 'src/**.pem' - 'src/**.crt' # These files configure npm and the task runner. Changes could affect the outcome. From 70b7fc166c858ffd618363d5d6d691ed9b16ddf2 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Fri, 4 Sep 2026 12:25:49 -0700 Subject: [PATCH 10/10] Use exclusion-based workflow path filters --- .github/workflows/coding-standards.yml | 58 ++++++++++++++++++---- .github/workflows/end-to-end-tests.yml | 44 +++++++++------- .github/workflows/javascript-tests.yml | 53 +++++++++++++++++--- .github/workflows/performance.yml | 44 +++++++++------- .github/workflows/php-compatibility.yml | 48 ++++++++++++++++-- .github/workflows/phpunit-tests.yml | 49 ++++++++++-------- .github/workflows/test-build-processes.yml | 46 ++++++++++------- 7 files changed, 248 insertions(+), 94 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index fcd51203b6fef..e1526d54913f3 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -14,24 +14,60 @@ on: - '3.[89]' - '[4-9].[0-9]' paths: - # Any change to a relevant PHP or JavaScript file should run checks. - - 'src/**.js' - - 'src/**.php' - - '*.php' # PHP files in the root, like wp-config-sample.php. - - 'tests/**.php' - - 'tests/qunit/**.js' - # These files configure npm. Changes could affect the outcome. + - '**' + # Documentation, repository metadata, and local environment configuration. + - '!**.md' + - '!.devcontainer/**' + - '!.editorconfig' + - '!.env.example' + - '!.git-blame-ignore-revs' + - '!.gitignore' + - '!.mailmap' + - '!docker-compose.yml' + - '!jsdoc.conf.json' + - '!tsconfig.json' + - '!typings/**' + - '!wp-cli.yml' + # File types that PHPCS and JSHint do not inspect. + - '!**.crt' + - '!**.css' + - '!**.dat' + - '!**.dist' + - '!**.html' + - '!**.jpg' + - '!**.json' + - '!**.map' + - '!**.mo' + - '!**.neon' + - '!**.pem' + - '!**.png' + - '!**.po' + - '!**.scss' + - '!**.svg' + - '!**.txt' + - '!**.webp' + - '!**.woff2' + - '!**.xml' + - '!**.yaml' + - '!**.yml' + # JavaScript outside the JSHint targets and all tooling are not inspected. + - '!tests/e2e/**.js' + - '!tests/performance/**.js' + - '!tools/**' + - '!.eslintrc-jsdoc.js' + - '!.prettierrc.js' + - '!eslint.config.js' + - '!webpack.config.js' + # Other workflows do not affect these checks. + - '!.github/**' + # Re-include configuration and workflow files that affect these checks. - 'package*.json' - '.npmrc' - '.nvmrc' - 'Gruntfile.js' - # These files configure Composer. Changes could affect the outcome. - 'composer.*' - # These files configure JSHint. Changes could affect the outcome. - '**.jshintrc' - # This file configures PHPCS. Changes could affect the outcome. - 'phpcs.xml.dist' - # Confirm any changes to relevant workflow files. - '.github/workflows/coding-standards.yml' - '.github/workflows/reusable-coding-standards-*.yml' workflow_dispatch: diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index f393bbecf67a7..5c63cde47a349 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -13,27 +13,37 @@ on: - '5.[3-9]' - '[6-9].[0-9]' paths: - # Any change to a source PHP, CSS, JavaScript, or JSON file should run checks. - - 'src/**.css' - - 'src/**.js' - - 'src/**.json' - - 'src/**.php' - - '*.php' # PHP files in the root, like wp-config-sample.php. - # These files configure npm and the task runner. Changes could affect the outcome. - - 'package*.json' - - '.npmrc' - - '.nvmrc' - - 'Gruntfile.js' - - 'webpack.config.js' + - '**' + # Documentation and repository metadata. + - '!**.md' + - '!.devcontainer/**' + - '!.editorconfig' + - '!.git-blame-ignore-revs' + - '!.gitignore' + - '!.mailmap' + - '!typings/**' + # Configuration for unrelated checks. + - '!.eslintrc-jsdoc.js' + - '!.jshintrc' + - '!.prettierrc.js' + - '!.version-support-*.json' + - '!eslint.config.js' + - '!jsdoc.conf.json' + - '!phpcompat.xml.dist' + - '!phpcs.xml.dist' + - '!phpstan.neon.dist' + - '!phpunit.xml.dist' + - '!tsconfig.json' + # Other test suites, tools, and workflows do not affect these tests. + - '!tests/**' + - '!tools/**' + - '!.github/**' + # Re-include the test, tool, and workflow files used here. + - 'tests/e2e/**' - 'tools/gutenberg/**' - 'tools/local-env/**' - 'tools/vendors/**' - 'tools/webpack/**' - # These files configure Composer. Changes could affect the outcome. - - 'composer.*' - # These 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: diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml index 75a756afb812d..ed38f79aa709b 100644 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -13,9 +13,52 @@ on: - '3.[89]' - '[4-9].[0-9]' paths: - # Any change to a source JavaScript file should run tests. - - 'src/**.js' - # These files configure npm and the task runner. Changes could affect the outcome. + - '**' + # Documentation, repository metadata, and local environment configuration. + - '!**.md' + - '!.devcontainer/**' + - '!.editorconfig' + - '!.env.example' + - '!.git-blame-ignore-revs' + - '!.gitignore' + - '!.mailmap' + - '!docker-compose.yml' + - '!jsdoc.conf.json' + - '!typings/**' + - '!wp-cli.yml' + # File types that the JavaScript tests do not exercise. + - '!**.crt' + - '!**.css' + - '!**.dat' + - '!**.dist' + - '!**.html' + - '!**.jpg' + - '!**.json' + - '!**.map' + - '!**.mo' + - '!**.neon' + - '!**.pem' + - '!**.php' + - '!**.png' + - '!**.po' + - '!**.scss' + - '!**.svg' + - '!**.txt' + - '!**.webp' + - '!**.woff2' + - '!**.xml' + - '!**.yaml' + - '!**.yml' + # JavaScript outside the QUnit suite and related tooling is not exercised. + - '!tests/e2e/**.js' + - '!tests/performance/**.js' + - '!tools/**' + - '!.eslintrc-jsdoc.js' + - '!.prettierrc.js' + - '!eslint.config.js' + # Other workflows do not affect these tests. + - '!.github/**' + # Re-include configuration, tests, tools, and workflows used here. - 'package*.json' - '.npmrc' - '.nvmrc' @@ -24,13 +67,9 @@ on: - 'tools/gutenberg/**' - 'tools/vendors/**' - 'tools/webpack/**' - # This file configures ESLint. Changes could affect the outcome. - '.eslintignore' - # This file configures JSHint. Changes could affect the outcome. - '.jshintrc' - # Any change to the QUnit directory should run tests. - 'tests/qunit/**' - # Confirm any changes to relevant workflow files. - '.github/workflows/javascript-tests.yml' - '.github/workflows/reusable-javascript-tests.yml' workflow_dispatch: diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 63b013782a176..f8f4c146ee38b 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -13,27 +13,37 @@ on: - '6.[2-9]' - '[7-9].[0-9]' paths: - # Any change to a source PHP, CSS, JavaScript, or JSON file should run checks. - - 'src/**.css' - - 'src/**.js' - - 'src/**.json' - - 'src/**.php' - - '*.php' # PHP files in the root, like wp-config-sample.php. - # These files configure npm and the task runner. Changes could affect the outcome. - - 'package*.json' - - '.npmrc' - - '.nvmrc' - - 'Gruntfile.js' - - 'webpack.config.js' + - '**' + # Documentation and repository metadata. + - '!**.md' + - '!.devcontainer/**' + - '!.editorconfig' + - '!.git-blame-ignore-revs' + - '!.gitignore' + - '!.mailmap' + - '!typings/**' + # Configuration for unrelated checks. + - '!.eslintrc-jsdoc.js' + - '!.jshintrc' + - '!.prettierrc.js' + - '!.version-support-*.json' + - '!eslint.config.js' + - '!jsdoc.conf.json' + - '!phpcompat.xml.dist' + - '!phpcs.xml.dist' + - '!phpstan.neon.dist' + - '!phpunit.xml.dist' + - '!tsconfig.json' + # Other test suites, tools, and workflows do not affect these tests. + - '!tests/**' + - '!tools/**' + - '!.github/**' + # Re-include the test, tool, and workflow files used here. + - 'tests/performance/**' - 'tools/gutenberg/**' - 'tools/local-env/**' - 'tools/vendors/**' - 'tools/webpack/**' - # These files configure Composer. Changes could affect the outcome. - - 'composer.*' - # These 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: diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml index 496aadb8108f4..7bb6869fd5a79 100644 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -13,13 +13,51 @@ on: - '5.[5-9]' - '[6-9].[0-9]' paths: - # This workflow only scans source PHP files. - - 'src/**.php' - # These files configure Composer. Changes could affect the outcome. + - '**' + # Documentation, repository metadata, and local environment configuration. + - '!**.md' + - '!.devcontainer/**' + - '!.editorconfig' + - '!.env.example' + - '!.git-blame-ignore-revs' + - '!.gitignore' + - '!.jshintrc' + - '!.mailmap' + - '!docker-compose.yml' + - '!jsdoc.conf.json' + - '!typings/**' + - '!wp-cli.yml' + # File types that the PHP compatibility scan does not inspect. + - '!**.crt' + - '!**.css' + - '!**.dat' + - '!**.dist' + - '!**.html' + - '!**.jpg' + - '!**.js' + - '!**.json' + - '!**.map' + - '!**.mo' + - '!**.neon' + - '!**.pem' + - '!**.png' + - '!**.po' + - '!**.scss' + - '!**.svg' + - '!**.txt' + - '!**.webp' + - '!**.woff2' + - '!**.xml' + - '!**.yaml' + - '!**.yml' + # Only source PHP files are scanned. + - '!*.php' + - '!tests/**' + - '!tools/**' + - '!.github/**' + # Re-include configuration and workflow files that affect the scan. - 'composer.*' - # This file configures PHP compatibility scanning. Changes could affect the outcome. - 'phpcompat.xml.dist' - # Confirm any changes to relevant workflow files. - '.github/workflows/php-compatibility.yml' - '.github/workflows/reusable-php-compatibility.yml' workflow_dispatch: diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index c1075ffd9c136..aea51a37d3cdb 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -12,30 +12,39 @@ on: - '3.[7-9]' - '[4-9].[0-9]' paths: - # Any change to a source PHP, CSS, JavaScript, JSON, HTML, or otherwise tested file should run checks. - - 'src/**.css' - - 'src/**.html' - - 'src/**.js' - - 'src/**.json' - - 'src/**.php' - - 'src/license.txt' + - '**' + # Documentation and repository metadata. + - '!**.md' + - '!.devcontainer/**' + - '!.editorconfig' + - '!.git-blame-ignore-revs' + - '!.gitignore' + - '!.mailmap' + - '!typings/**' + # Configuration for unrelated checks. + - '!.eslintrc-jsdoc.js' + - '!.jshintrc' + - '!.prettierrc.js' + - '!.version-support-*.json' + - '!eslint.config.js' + - '!jsdoc.conf.json' + - '!phpcompat.xml.dist' + - '!phpcs.xml.dist' + - '!phpstan.neon.dist' + - '!phpunit.xml.dist' + - '!tsconfig.json' + - '!webpack.config.js' + # Other test suites, tools, and workflows do not affect these tests. + - '!tests/**' + - '!tools/**' + - '!.github/**' + # Re-include documentation, tests, tools, and workflows used here. - 'SECURITY.md' - - '*.php' # PHP files in the root, like wp-config-sample.php. - # These files configure npm and the task runner. Changes could affect the outcome. - - 'package*.json' - - '.npmrc' - - '.nvmrc' - - 'Gruntfile.js' - # These files configure the local environment and Gutenberg assets. Changes could affect the outcome. + - 'src/license.txt' + - 'tests/phpunit/**' - 'tools/gutenberg/**' - 'tools/local-env/**' - # These files configure Composer. Changes could affect the outcome. - - 'composer.*' - # These files affect the phpunit tests. Changes could affect the outcome. - - 'tests/phpunit/**' - - 'tests/phpunit/multisite.xml' - 'phpunit.xml.dist' - # Confirm any changes to relevant workflow files. - '.github/workflows/phpunit-tests.yml' - '.github/workflows/reusable-phpunit-tests-*.yml' - '.github/workflows/reusable-prepare-gutenberg.yml' diff --git a/.github/workflows/test-build-processes.yml b/.github/workflows/test-build-processes.yml index 440b4d05b4516..bfabbb855ef18 100644 --- a/.github/workflows/test-build-processes.yml +++ b/.github/workflows/test-build-processes.yml @@ -12,26 +12,38 @@ on: - '3.[7-9]' - '[4-9].[0-9]' paths: - # Any change to a source PHP, CSS, JavaScript, JSON, or certificate file should run checks. - - 'src/**.css' - - 'src/**.js' - - 'src/**.json' - - 'src/**.php' - - '*.php' # PHP files in the root, like wp-config-sample.php. - - 'src/**.pem' - - 'src/**.crt' - # These files configure npm and the task runner. Changes could affect the outcome. - - 'package*.json' - - '.npmrc' - - '.nvmrc' - - 'Gruntfile.js' - - 'webpack.config.js' + - '**' + # Documentation, repository metadata, and local environment configuration. + - '!**.md' + - '!.devcontainer/**' + - '!.editorconfig' + - '!.env.example' + - '!.git-blame-ignore-revs' + - '!.gitignore' + - '!.mailmap' + - '!docker-compose.yml' + - '!typings/**' + - '!wp-cli.yml' + # Configuration for unrelated checks. + - '!.eslintrc-jsdoc.js' + - '!.jshintrc' + - '!.prettierrc.js' + - '!.version-support-*.json' + - '!eslint.config.js' + - '!jsdoc.conf.json' + - '!phpcompat.xml.dist' + - '!phpcs.xml.dist' + - '!phpstan.neon.dist' + - '!phpunit.xml.dist' + - '!tsconfig.json' + # Tests, unrelated tools, and other workflows do not affect the build. + - '!tests/**' + - '!tools/**' + - '!.github/**' + # Re-include the tools and workflows used by the build. - 'tools/gutenberg/**' - 'tools/vendors/**' - 'tools/webpack/**' - # These files configure Composer. Changes could affect the outcome. - - 'composer.*' - # Confirm any changes to relevant workflow files. - '.github/workflows/test-build-processes.yml' - '.github/workflows/reusable-test-core-build-process.yml' workflow_dispatch: