Build/Test Tools: Refine paths filter for workflows.

Some GitHub Action workflows use the `paths` filter to limit when workflows run for pull requests. This helps avoid running workflows unnecessarily when the pull request does not change any relevant code.

Currently, a few of these workflows are configured to run when any `.yml` file in the `.github/workflows/` directory is changed. This updates those workflows to target more specific workflow files for more efficient running.

See #61564.

git-svn-id: https://develop.svn.wordpress.org/trunk@59252 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2024-10-18 14:00:27 +00:00
parent bd8e6504b2
commit b1a639b52a
4 changed files with 10 additions and 8 deletions

View File

@ -29,8 +29,9 @@ on:
- '.jshintrc'
# This file configures PHPCS. Changes could affect the outcome.
- 'phpcs.xml.dist'
# Changes to workflow files should always verify all workflows are successful.
- '.github/workflows/*.yml'
# Confirm any changes to relevant workflow files.
- '.github/workflows/coding-standards.yml'
- '.github/workflows/reusable-coding-standards-*.yml'
workflow_dispatch:
# Cancels all previous workflow runs for pull requests that have not completed.

View File

@ -27,8 +27,9 @@ on:
- '.jshintrc'
# Any change to the QUnit directory should run tests.
- 'tests/qunit/**'
# Changes to workflow files should always verify all workflows are successful.
- '.github/workflows/*.yml'
# Confirm any changes to relevant workflow files.
- '.github/workflows/javascript-tests.yml'
- '.github/workflows/reusable-javascript-tests.yml'
workflow_dispatch:
# Cancels all previous workflow runs for pull requests that have not completed.

View File

@ -24,8 +24,9 @@ on:
- 'composer.*'
# This file configures PHP compatibility scanning. Changes could affect the outcome.
- 'phpcompat.xml.dist'
# Changes to workflow files should always verify all workflows are successful.
- '.github/workflows/*.yml'
# Confirm any changes to relevant workflow files.
- '.github/workflows/php-compatibility.yml'
- '.github/workflows/reusable-php-compatibility.yml'
workflow_dispatch:
# Cancels all previous workflow runs for pull requests that have not completed.

View File

@ -7,8 +7,7 @@ on:
- trunk
paths:
- '.github/workflows/test-old-branches.yml'
- '.github/workflows/reusable-phpunit-tests-v1.yml'
- '.github/workflows/reusable-phpunit-tests-v2.yml'
- '.github/workflows/reusable-phpunit-tests-v[0-9]+.yml'
# Run twice a month on the 1st and 15th at 00:00 UTC.
schedule:
- cron: '0 0 1 * *'