Make WordPress Core


Ignore:
Timestamp:
11/18/2022 02:50:52 PM (17 months 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/php-compatibility.yml

    r54851 r54856  
    6767          php-version: '7.4'
    6868          coverage: none
    69           tools: composer, cs2pr
     69          tools: cs2pr
    7070
    7171      - name: Log debug information
     
    8585          key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }}
    8686
     87      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
     88      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
    8789      - name: Install Composer dependencies
    8890        uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    8991        with:
    90           composer-options: "--no-progress --no-ansi"
     92          custom-cache-suffix: ${{ steps.get-date.outputs.date }}
    9193
    9294      - name: Make Composer packages available globally
Note: See TracChangeset for help on using the changeset viewer.