Make WordPress Core


Ignore:
Timestamp:
11/18/2022 02:50:52 PM (3 years ago)
Author:
desrosj
Message:

Build/Test Tools: Improve how Composer dependencies are installed.

To improve how Composer dependencies are installed and managed within GitHub Actions, the ramsey/composer-install third-party action is now used consistently throughout all workflows.

Previously, some workflows manually ran composer commands while others already used ramsey/composer-install.

The ramsey/composer-install action manages caching dependencies across workflow runs internally, which is something that was manually handled before this change.

Props jrf, desrosj.
Fixes #53841.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/coding-standards.yml

    r54851 r54856  
    5757  # - Generate a report for displaying `test` directory issues as pull request annotations.
    5858  # - Ensures version-controlled files are not modified or deleted.
    59 
    6059  phpcs:
    6160    name: PHP coding standards
     
    7372          php-version: '7.4'
    7473          coverage: none
    75           tools: composer, cs2pr
     74          tools: cs2pr
    7675
    7776      # This date is used to ensure that the PHPCS cache is cleared at least once every week.
     
    8786          key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
    8887
     88      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
     89      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
    8990      - name: Install Composer dependencies
    9091        uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    9192        with:
    92           composer-options: "--no-progress --no-ansi"
     93          custom-cache-suffix: ${{ steps.get-date.outputs.date }}
    9394
    9495      - name: Make Composer packages available globally
Note: See TracChangeset for help on using the changeset viewer.