Skip to content

Commit 3745637

Browse files
committed
GH Actions: improve readability
* Split a few steps with multiple commands into individual steps. * Use multi-line, discard whitespace YAML syntax to make the commands more readable.
1 parent c2d8549 commit 3745637

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,21 +107,44 @@ jobs:
107107
ini-values: error_reporting=E_ALL, display_errors=On, display_startup_errors=On
108108
coverage: none
109109

110+
# Remove the PHP 8.x polyfills on PHP < 7 as the minimum requirement is PHP 7.1 and the autoloading
111+
# of the polyfill bootstrap file via Composer would generate a parse error, blocking the DealerDirect plugin
112+
# from setting the installed_paths for PHPCS.
113+
- name: "Conditionally remove some polyfill packages (PHP 5.4)"
114+
if: ${{ matrix.php == '5.4' }}
115+
run: >
116+
composer remove --dev --no-update --no-scripts --no-interaction
117+
symfony/polyfill-php80
118+
symfony/polyfill-php81
119+
symfony/polyfill-php82
120+
symfony/polyfill-php83
121+
symfony/polyfill-php84
122+
symfony/polyfill-php85
123+
110124
- name: "Conditionally require specific versions of the polyfills (PHP 5.4)"
111125
if: ${{ matrix.php == '5.4' }}
112-
run: |
113-
# Remove the PHP 8.x polyfills on PHP < 7 as the minimum requirement is PHP 7.1 and the autoloading
114-
# of the polyfill bootstrap file via Composer would generate a parse error, blocking the DealerDirect plugin
115-
# from setting the installed_paths for PHPCS.
116-
composer remove --dev symfony/polyfill-php80 symfony/polyfill-php81 symfony/polyfill-php82 symfony/polyfill-php83 symfony/polyfill-php84 symfony/polyfill-php85 --no-update --no-scripts --no-interaction
117-
composer require --dev --no-update symfony/polyfill-php72:"1.19" symfony/polyfill-php73:"1.19" symfony/polyfill-php74:"1.19" --no-interaction
126+
run: >
127+
composer require --dev --no-update --no-interaction
128+
symfony/polyfill-php72:"1.19"
129+
symfony/polyfill-php73:"1.19"
130+
symfony/polyfill-php74:"1.19"
131+
132+
# Remove the PHP >= 8.5 polyfills on PHP 7.1 as the minimum requirement is PHP 7.2.
133+
- name: "Conditionally remove some polyfill packages (PHP 7.1)"
134+
if: ${{ matrix.php == '7.1' }}
135+
run: composer remove --dev symfony/polyfill-php85 --no-update --no-scripts --no-interaction
118136

119137
- name: "Conditionally require specific versions of the polyfills (PHP 7.1)"
120138
if: ${{ matrix.php == '7.1' }}
121-
run: |
122-
# Remove the PHP >= 8.5 polyfills on PHP 7.1 as the minimum requirement is PHP 7.2.
123-
composer remove --dev symfony/polyfill-php85 --no-update --no-scripts --no-interaction
124-
composer require --dev --no-update symfony/polyfill-php73:"1.30" symfony/polyfill-php74:"1.30" symfony/polyfill-php80:"1.30" symfony/polyfill-php81:"1.30" symfony/polyfill-php82:"1.30" symfony/polyfill-php83:"1.30" symfony/polyfill-php84:"1.30" --no-interaction
139+
run: >
140+
composer require --dev --no-update --no-interaction
141+
symfony/polyfill-php73:"1.30"
142+
symfony/polyfill-php74:"1.30"
143+
symfony/polyfill-php80:"1.30"
144+
symfony/polyfill-php81:"1.30"
145+
symfony/polyfill-php82:"1.30"
146+
symfony/polyfill-php83:"1.30"
147+
symfony/polyfill-php84:"1.30"
125148
126149
- name: Conditionally update PHPCompatibility to develop version
127150
if: ${{ matrix.phpcompat != 'stable' }}

0 commit comments

Comments
 (0)