Skip to content

Commit 5f130d8

Browse files
committed
GH Actions: few small workflow tweaks
* Remove some information from a step name which is already in a comment above it. * Fold two steps into one (Composer install). * Add a missing condition to prevent a step from running when it is not needed.
1 parent e844821 commit 5f130d8

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
tools: cs2pr
111111

112112
# This action also handles the caching of the dependencies.
113-
- name: Set up node and enable caching of dependencies
113+
- name: Set up node
114114
uses: actions/setup-node@v4
115115
with:
116116
node-version: '20'
@@ -125,18 +125,9 @@ jobs:
125125
# Install dependencies and handle caching in one go.
126126
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
127127
- name: Install Composer dependencies
128-
if: ${{ matrix.php != '8.4' }}
129128
uses: "ramsey/composer-install@v2"
130129
with:
131-
# Bust the cache at least once a month - output format: YYYY-MM.
132-
custom-cache-suffix: $(date -u "+%Y-%m")
133-
134-
# For PHP "nightly", we install with ignore platform reqs.
135-
- name: Install Composer dependencies - with ignore platform
136-
if: ${{ matrix.php == '8.4' }}
137-
uses: "ramsey/composer-install@v2"
138-
with:
139-
composer-options: --ignore-platform-req=php
130+
composer-options: ${{ matrix.php == '8.4' && '--ignore-platform-req=php' || '' }}
140131
custom-cache-suffix: $(date -u "+%Y-%m")
141132

142133
# Note: The code style check is run multiple times against every PHP version
@@ -161,6 +152,7 @@ jobs:
161152
run: cs2pr ./phpcs-report.xml
162153

163154
- name: Download the PHPCS phar
155+
if: ${{ matrix.custom_ini == false }}
164156
uses: actions/download-artifact@v3
165157
with:
166158
name: phpcs-phar

0 commit comments

Comments
 (0)