Skip to content

Commit f619f0b

Browse files
committed
Merge branch 'feature/ghactions-various-tweaks' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents ac912de + 1a2d19f commit f619f0b

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,20 @@ jobs:
2020
# Keys:
2121
# - custom_ini: Whether to run with specific custom ini settings to hit very specific
2222
# code conditions.
23-
# - experimental: Whether the build is "allowed to fail".
2423
matrix:
25-
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
24+
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
2625
custom_ini: [false]
27-
experimental: [false]
2826

2927
include:
3028
# Builds running the basic tests with different PHP ini settings.
3129
- php: '5.5'
3230
custom_ini: true
33-
experimental: false
3431
- php: '7.0'
3532
custom_ini: true
36-
experimental: false
37-
38-
# Nightly.
39-
- php: '8.1'
40-
custom_ini: false
41-
experimental: true
4233

4334
name: "PHP: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }}"
4435

45-
continue-on-error: ${{ matrix.experimental }}
36+
continue-on-error: ${{ matrix.php == '8.1' }}
4637

4738
steps:
4839
- name: Checkout code
@@ -54,11 +45,11 @@ jobs:
5445
# Set the "short_open_tag" ini to make sure specific conditions are tested.
5546
# Also turn on error_reporting to ensure all notices are shown.
5647
if [[ ${{ matrix.custom_ini }} == true && "${{ matrix.php }}" == '5.5' ]]; then
57-
echo '::set-output name=PHP_INI::phar.readonly=Off, error_reporting=E_ALL, display_errors=On, date.timezone=Australia/Sydney, short_open_tag=On, asp_tags=On'
48+
echo '::set-output name=PHP_INI::phar.readonly=Off, error_reporting=-1, display_errors=On, date.timezone=Australia/Sydney, short_open_tag=On, asp_tags=On'
5849
elif [[ ${{ matrix.custom_ini }} == true && "${{ matrix.php }}" == '7.0' ]]; then
59-
echo '::set-output name=PHP_INI::phar.readonly=Off, error_reporting=E_ALL, display_errors=On, date.timezone=Australia/Sydney, short_open_tag=On'
50+
echo '::set-output name=PHP_INI::phar.readonly=Off, error_reporting=-1, display_errors=On, date.timezone=Australia/Sydney, short_open_tag=On'
6051
else
61-
echo '::set-output name=PHP_INI::phar.readonly=Off, error_reporting=E_ALL, display_errors=On'
52+
echo '::set-output name=PHP_INI::phar.readonly=Off, error_reporting=-1, display_errors=On'
6253
fi
6354
6455
- name: Install PHP
@@ -72,12 +63,12 @@ jobs:
7263
# Install dependencies and handle caching in one go.
7364
# @link https://github.com/marketplace/actions/install-composer-dependencies
7465
- name: Install Composer dependencies - normal
75-
if: ${{ matrix.php < 8.0 }}
66+
if: ${{ matrix.php < '8.0' }}
7667
uses: "ramsey/composer-install@v1"
7768

7869
# For PHP 8.0+, we need to install with ignore platform reqs as PHPUnit 7 is still used.
7970
- name: Install Composer dependencies - with ignore platform
80-
if: ${{ matrix.php >= 8.0 }}
71+
if: ${{ matrix.php >= '8.0' }}
8172
uses: "ramsey/composer-install@v1"
8273
with:
8374
composer-options: --ignore-platform-reqs
@@ -88,27 +79,27 @@ jobs:
8879
run: php bin/phpcs --config-set php_path php
8980

9081
- name: 'PHPUnit: run the tests'
91-
if: ${{ matrix.php != 8.1 }}
82+
if: ${{ matrix.php != '8.1' }}
9283
run: vendor/bin/phpunit tests/AllTests.php
9384

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

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

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

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

114105
- name: 'Composer: validate config'

0 commit comments

Comments
 (0)