From b2b95891e2233b8d13d336cde208370f9104b70f Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 12 Aug 2025 23:53:04 +0100 Subject: [PATCH 1/4] Increase the specificity of the path filtering for workflows. --- .github/workflows/check-built-files.yml | 9 ++++----- .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 +++++----- 8 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.github/workflows/check-built-files.yml b/.github/workflows/check-built-files.yml index 72b6ae86d127e..a100f5201c31e 100644 --- a/.github/workflows/check-built-files.yml +++ b/.github/workflows/check-built-files.yml @@ -12,11 +12,10 @@ on: - '6.[8-9]' - '[7-9].[0-9]' paths: - # Any change to a CSS, JavaScript, JSON, or SASS file should run checks. - - '**.css' - - '**.js' - - '**.json' - - '**.sass' + # Any change to a source CSS, JavaScript, or JSON file should run checks. + - 'src/**.css' + - 'src/**.js' + - 'src/**.json' # These files configure npm and the task runner. Changes could affect the outcome. - 'package*.json' - '.npmrc' diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 5b5645ef20859..8f545f2165f77 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -18,9 +18,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 b7d60a1567920..b32c5c9d82590 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -18,10 +18,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 54ca64ef6a508..d3a939c744c28 100644 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -17,8 +17,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 c7004495fed43..86ba493c21a3f 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -17,10 +17,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 4ad627af1e24c..f41e9944dd56d 100644 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -18,8 +18,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 420506d42265c..bfd3935be4912 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -15,12 +15,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 587b6b02da290..7129bc30ea707 100644 --- a/.github/workflows/test-build-processes.yml +++ b/.github/workflows/test-build-processes.yml @@ -15,11 +15,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 c0548beb842f2cbc06ee92171be3a241810fde18 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 12 Aug 2025 23:54:03 +0100 Subject: [PATCH 2/4] Add some missing files to the path filtering. --- .github/workflows/local-docker-environment.yml | 2 ++ .github/workflows/phpunit-tests.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/local-docker-environment.yml b/.github/workflows/local-docker-environment.yml index bf275abd72205..5ea1c59395a25 100644 --- a/.github/workflows/local-docker-environment.yml +++ b/.github/workflows/local-docker-environment.yml @@ -12,6 +12,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' @@ -38,6 +39,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' diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index bfd3935be4912..64b3268be1361 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -31,6 +31,7 @@ on: # These files configure Composer. Changes could affect the outcome. - 'composer.*' # This files affect the phpunit tests. Changes could affect the outcome. + - 'phpunit.xml.dist' - 'tests/phpunit/**' # Confirm any changes to relevant workflow files. - '.github/workflows/phpunit-tests.yml' From 142f1a2d61cbf08f6bb9a598ae05e505d47adc33 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 14 Aug 2025 23:06:11 +0100 Subject: [PATCH 3/4] Fix some typos. --- .github/workflows/end-to-end-tests.yml | 2 +- .github/workflows/performance.yml | 2 +- .github/workflows/phpunit-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index b32c5c9d82590..35a1628770aaf 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -32,7 +32,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 86ba493c21a3f..4a002bc7618c2 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -31,7 +31,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' diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 64b3268be1361..97d4885d1eff1 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -30,7 +30,7 @@ on: - 'Gruntfile.js' # These files configure Composer. Changes could affect the outcome. - 'composer.*' - # This files affect the phpunit tests. Changes could affect the outcome. + # These files affect the phpunit tests. Changes could affect the outcome. - 'phpunit.xml.dist' - 'tests/phpunit/**' # Confirm any changes to relevant workflow files. From f2a751b3f2137bed5e61412e1d7edb9472b0dfb2 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 14 Aug 2025 23:07:04 +0100 Subject: [PATCH 4/4] 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 7129bc30ea707..d1eedf195acca 100644 --- a/.github/workflows/test-build-processes.yml +++ b/.github/workflows/test-build-processes.yml @@ -15,11 +15,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'