Skip to content

Commit

Permalink
GH Actions: version update for ramsey/composer-install (#117)
Browse files Browse the repository at this point in the history
The action used to install Composer packages and handle the caching has released a new major (and some follow-up patch releases), which means, the action reference needs to be updated to benefit from it.

Includes adding `--no-interaction` to "plain" Composer commands to potentially prevent CI hanging if, for whatever reason, interaction would be needed in the future.

Refs:
* https://github.com/ramsey/composer-install/releases/tag/2.0.0
* https://github.com/ramsey/composer-install/releases/tag/2.0.1
* https://github.com/ramsey/composer-install/releases/tag/2.0.2

Co-authored-by: jrfnl <[email protected]>
  • Loading branch information
jrfnl and jrfnl authored Jan 28, 2022
1 parent 99462ec commit 9e4c05a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"

# Check the code-style consistency of the PHP files.
- name: Check PHP code style
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,18 @@ jobs:
- name: Conditionally remove PHPUnit requirement
if: ${{ ( matrix.wp == 'trunk' || matrix.wp >= 5.9 ) && matrix.wp != 'latest' }}
continue-on-error: true
run: composer remove --dev phpunit/phpunit --no-update || true
run: composer remove --dev phpunit/phpunit --no-update --no-interaction || true

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies for PHP < 8.0
if: ${{ matrix.php < 8.0 || ( ( matrix.wp == 'trunk' || matrix.wp >= 5.9 ) && matrix.wp != 'latest' ) }}
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"

# For PHP 8.0 and above on WP 5.2 - 5.8, we need to install with ignore platform reqs as not all dependencies allow it.
- name: Install Composer dependencies for PHP >= 8.0
if: ${{ matrix.php >= 8.0 && ( matrix.wp == 'latest' || ( matrix.wp != 'trunk' && matrix.wp < 5.9 ) ) }}
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
composer-options: --ignore-platform-reqs

Expand Down

0 comments on commit 9e4c05a

Please sign in to comment.