Skip to content

Commit 1a2d19f

Browse files
committed
GH Actions: minor tweaks to the conditions
The `matrix.php` setting is a text string, so let's compare against it as a text string.
1 parent d5934ef commit 1a2d19f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ jobs:
6363
# Install dependencies and handle caching in one go.
6464
# @link https://github.com/marketplace/actions/install-composer-dependencies
6565
- name: Install Composer dependencies - normal
66-
if: ${{ matrix.php < 8.0 }}
66+
if: ${{ matrix.php < '8.0' }}
6767
uses: "ramsey/composer-install@v1"
6868

6969
# For PHP 8.0+, we need to install with ignore platform reqs as PHPUnit 7 is still used.
7070
- name: Install Composer dependencies - with ignore platform
71-
if: ${{ matrix.php >= 8.0 }}
71+
if: ${{ matrix.php >= '8.0' }}
7272
uses: "ramsey/composer-install@v1"
7373
with:
7474
composer-options: --ignore-platform-reqs
@@ -79,27 +79,27 @@ jobs:
7979
run: php bin/phpcs --config-set php_path php
8080

8181
- name: 'PHPUnit: run the tests'
82-
if: ${{ matrix.php != 8.1 }}
82+
if: ${{ matrix.php != '8.1' }}
8383
run: vendor/bin/phpunit tests/AllTests.php
8484

8585
# We need to ignore the config file so that PHPUnit doesn't try to read it.
8686
# The config file causes an error on PHP 8.1+ with PHPunit 7, but it's not needed here anyway
8787
# as we can pass all required settings in the phpunit command.
8888
- name: 'PHPUnit: run the tests on PHP nightly'
89-
if: ${{ matrix.php == 8.1 }}
89+
if: ${{ matrix.php == '8.1' }}
9090
run: vendor/bin/phpunit tests/AllTests.php --no-configuration --bootstrap=tests/bootstrap.php --dont-report-useless-tests
9191

9292
- name: 'PHPCS: check code style without cache, no parallel'
93-
if: ${{ matrix.custom_ini == false && matrix.php != 7.4 }}
93+
if: ${{ matrix.custom_ini == false && matrix.php != '7.4' }}
9494
run: php bin/phpcs --no-cache --parallel=1
9595

9696
- name: 'PHPCS: check code style to show results in PR'
97-
if: ${{ matrix.custom_ini == false && matrix.php == 7.4 }}
97+
if: ${{ matrix.custom_ini == false && matrix.php == '7.4' }}
9898
continue-on-error: true
9999
run: php bin/phpcs --no-cache --parallel=1 --report-full --report-checkstyle=./phpcs-report.xml
100100

101101
- name: Show PHPCS results in PR
102-
if: ${{ matrix.custom_ini == false && matrix.php == 7.4 }}
102+
if: ${{ matrix.custom_ini == false && matrix.php == '7.4' }}
103103
run: cs2pr ./phpcs-report.xml
104104

105105
- name: 'Composer: validate config'

0 commit comments

Comments
 (0)