[wp-trac] [WordPress Trac] #54410: GH Actions: Consider revising the Coding Standards actions to only scan modified files.

WordPress Trac noreply at wordpress.org
Wed Nov 10 02:55:07 UTC 2021


#54410: GH Actions: Consider revising the Coding Standards actions to only scan
modified files.
------------------------------+-----------------------------
 Reporter:  costdev           |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 In the build up to the feature freeze, we've seen a number of Pull
 Requests fail CI on Coding Standards issues that existed within core
 commits.

 [https://github.com/WordPress/wordpress-
 develop/blob/trunk/.github/workflows/coding-standards.yml coding-
 standards.yml] runs PHPCS on all core files for each Pull Request.

 This ticket is to initiate a discussion on whether or not we are
 interested in modifying this file to:

 - Continue to run PHPCS on ''all core files'' for `push` events (commits)
 to `trunk`
 - Only run PHPCS on the ''changed files'' in Pull Requests.

 Some potential benefits:
 - Pull Requests don't fail CI because of Coding Standards errors in
 commits to trunk.
 - Committers don't have to manually re-run CI for every Pull Request that
 failed for this reason.
 - Committers don't have to stress that Pull Requests are being held up
 because of an issue in their commit.
 - Contributors don't have to stress that they can't find the problem in
 their Pull Request.
 - Contributors and Committers spend less time asking for/providing
 assistance or time to look into the cause.
 - Contributors know that coding standards issues exist specifically within
 the files they modified.

 Resources:
 - [https://github.com/marketplace/actions/get-all-changed-files#get-all-
 changed-files-as-space-delimited GH Action - Get All Changed Files]
 (third-party)
 - [https://dev.to/scienta/get-changed-files-in-github-actions-1p36 Get
 changed files in GitHub Actions]

 As much as we've done fine without this change, I think that removing the
 headaches above would be a worthwhile improvement to the contributor
 experience.

 Interested to hear others' thoughts on this.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54410>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list