Make WordPress Core

Opened 23 months ago

Closed 23 months ago

Last modified 23 months ago

#57148 closed defect (bug) (fixed)

Improve PHPCS caching

Reported by: desrosj's profile desrosj Owned by: desrosj's profile desrosj
Milestone: 6.2 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

In the coding standards GitHub Action workflow, the cache file produced by PHPCS is stored as a GHA cache to speed up runs on successive workflows.

This greatly decreases the time required to run scans when the cache file is present. But, because there are two different scans run and only one cache file is stored, the cache is likely not as efficient as it could be.

See the discussion on GitHub where this ticket was spawned from.

Change History (8)

This ticket was mentioned in PR #3650 on WordPress/wordpress-develop by @jrf.


23 months ago
#1

  • Keywords has-patch added

Create separate caches for the PHPCS src run and the PHPCS tests run and save both to the GHA cache.

Refs:

Trac ticket: https://core.trac.wordpress.org/ticket/57148

This ticket was mentioned in PR #3650 on WordPress/wordpress-develop by @jrf.


23 months ago
#2

  • Keywords has-patch added

Create separate caches for the PHPCS src run and the PHPCS tests run and save both to the GHA cache.

Refs:

Trac ticket: https://core.trac.wordpress.org/ticket/57148

#3 @jrf
23 months ago

PR GH #3650 addresses this.

#4 @jrf
23 months ago

  • Milestone changed from Future Release to 6.2

@jrf commented on PR #3650:


23 months ago
#5

Just a note about a thought I had. At first I considered suggesting we remove the <arg name="cache"> from phpcs.xml.dist, but I think it makes sense to leave that as that cache works for anyone running PHPCS commands locally.

Exactly. Sorry, I should have mentioned that in the PR description (cause I did the same thought exercise when creating the patch).

#6 @desrosj
23 months ago

  • Owner set to desrosj
  • Status changed from new to assigned

#7 @desrosj
23 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 54921:

Build/Test Tools: Improve caching for PHPCS.

This improves the speed of the PHPCS scans between workflow runs in GitHub Action by creating a scan cache file for each unique set of arguments passed to phpcs.

Props jrf.
Fixes #57148. See #53841.

Note: See TracTickets for help on using tickets.