Skip to content

Commit 18873d5

Browse files
committed
Update github actions config
1 parent 1097f99 commit 18873d5

File tree

2 files changed

+68
-48
lines changed

2 files changed

+68
-48
lines changed

.github/workflows/csqa.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
# Prevent the build from running when there are only irrelevant changes.
66
push:
77
paths-ignore:
8-
- '**.md'
8+
- "**.md"
99
pull_request:
1010
# Allow manually triggering the workflow.
1111
workflow_dispatch:
@@ -18,11 +18,11 @@ concurrency:
1818

1919
jobs:
2020
checkcs:
21-
name: 'Basic CS and QA checks'
21+
name: "Basic CS and QA checks"
2222
runs-on: ubuntu-latest
2323

2424
env:
25-
XMLLINT_INDENT: ' '
25+
XMLLINT_INDENT: " "
2626

2727
steps:
2828
- name: Checkout code
@@ -31,13 +31,13 @@ jobs:
3131
- name: Install PHP
3232
uses: shivammathur/setup-php@v2
3333
with:
34-
php-version: 'latest'
34+
php-version: "latest"
3535
coverage: none
3636
tools: cs2pr
3737

3838
# Using PHPCS `master` as an early detection system for bugs upstream.
39-
- name: 'Composer: adjust dependencies'
40-
run: composer require --no-update squizlabs/php_codesniffer:"dev-master"
39+
- name: "Composer: adjust dependencies"
40+
run: composer require --no-update squizlabs/php_codesniffer:"4.x-dev"
4141

4242
# Install dependencies and handle caching in one go.
4343
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer

.github/workflows/test.yml

Lines changed: 62 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -34,40 +34,60 @@ jobs:
3434
# - PHP 8.4 needs PHPCS 3.11.0+ to run without errors (though the errors don't affect this package).
3535
#
3636
# The matrix is set up so as not to duplicate the builds which are run for code coverage.
37-
php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3']
38-
phpcs_version: ['3.5.6', 'dev-master']
37+
php: ["5.5", "5.6", "7.0", "7.1", "7.2", "7.3"]
38+
phpcs_version: ["3.5.6", "4.0.0", "4.x-dev"]
39+
40+
exclude:
41+
# PHPCS 4.x requires PHP 7.2+
42+
- php: "5.5"
43+
phpcs_version: "4.0.0"
44+
- php: "5.5"
45+
phpcs_version: "4.x-dev"
46+
- php: "5.6"
47+
phpcs_version: "4.0.0"
48+
- php: "5.6"
49+
phpcs_version: "4.x-dev"
50+
- php: "7.0"
51+
phpcs_version: "4.0.0"
52+
- php: "7.0"
53+
phpcs_version: "4.x-dev"
54+
- php: "7.1"
55+
phpcs_version: "4.0.0"
56+
- php: "7.1"
57+
phpcs_version: "4.x-dev"
3958

4059
include:
41-
# Make the matrix complete without duplicating builds run in code coverage.
42-
- php: '8.4'
43-
phpcs_version: '3.6.1'
44-
45-
- php: '8.3'
46-
phpcs_version: 'dev-master'
47-
- php: '8.3'
48-
phpcs_version: '3.6.1'
49-
50-
- php: '8.2'
51-
phpcs_version: 'dev-master'
52-
- php: '8.2'
53-
phpcs_version: '3.6.1'
54-
55-
- php: '8.1'
56-
phpcs_version: 'dev-master'
57-
- php: '8.1'
58-
phpcs_version: '3.6.1'
59-
60-
- php: '8.0'
61-
phpcs_version: 'dev-master'
62-
- php: '8.0'
63-
phpcs_version: '3.5.7'
64-
65-
- php: '7.4'
66-
phpcs_version: 'dev-master'
60+
- php: "8.4"
61+
phpcs_version: "4.0.0"
62+
- php: "8.4"
63+
phpcs_version: "3.6.1"
64+
65+
- php: "8.3"
66+
phpcs_version: "4.x-dev"
67+
- php: "8.3"
68+
phpcs_version: "3.6.1"
69+
70+
- php: "8.2"
71+
phpcs_version: "4.x-dev"
72+
- php: "8.2"
73+
phpcs_version: "3.6.1"
74+
75+
- php: "8.1"
76+
phpcs_version: "4.x-dev"
77+
- php: "8.1"
78+
phpcs_version: "3.6.1"
79+
80+
- php: "8.0"
81+
phpcs_version: "4.x-dev"
82+
- php: "8.0"
83+
phpcs_version: "3.5.7"
84+
85+
- php: "7.4"
86+
phpcs_version: "4.x-dev"
6787

6888
# Experimental builds.
69-
- php: '8.5' # Nightly.
70-
phpcs_version: 'dev-master'
89+
- php: "8.5" # Nightly.
90+
phpcs_version: "4.x-dev"
7191

7292
name: "Test: PHP ${{ matrix.php }} on PHPCS ${{ matrix.phpcs_version }}"
7393

@@ -82,7 +102,7 @@ jobs:
82102
run: |
83103
# On stable PHPCS versions, allow for PHP deprecation notices.
84104
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
85-
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
105+
if [ "${{ matrix.phpcs_version }}" != "4.x-dev" ]; then
86106
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
87107
else
88108
echo 'PHP_INI=error_reporting=-1, display_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
@@ -95,7 +115,7 @@ jobs:
95115
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
96116
coverage: none
97117

98-
- name: 'Composer: adjust dependencies'
118+
- name: "Composer: adjust dependencies"
99119
run: |
100120
# Remove dev dependencies which are not compatible with all supported PHP versions.
101121
composer remove --dev --no-update sirbrillig/phpcs-import-detection phpstan/phpstan
@@ -146,15 +166,15 @@ jobs:
146166
strategy:
147167
matrix:
148168
include:
149-
- php: '8.4'
150-
phpcs_version: 'dev-master'
151-
- php: '7.4'
152-
phpcs_version: '3.5.6'
169+
- php: "8.4"
170+
phpcs_version: "4.x-dev"
171+
- php: "7.4"
172+
phpcs_version: "3.5.6"
153173

154-
- php: '5.4'
155-
phpcs_version: 'dev-master'
156-
- php: '5.4'
157-
phpcs_version: '3.5.6'
174+
- php: "7.2"
175+
phpcs_version: "4.x-dev"
176+
- php: "5.4"
177+
phpcs_version: "3.5.6"
158178

159179
name: "Coverage: PHP ${{ matrix.php }} on PHPCS ${{ matrix.phpcs_version }}"
160180

@@ -167,7 +187,7 @@ jobs:
167187
run: |
168188
# On stable PHPCS versions, allow for PHP deprecation notices.
169189
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
170-
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
190+
if [ "${{ matrix.phpcs_version }}" != "4.x-dev" ]; then
171191
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
172192
else
173193
echo 'PHP_INI=error_reporting=-1, display_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
@@ -180,7 +200,7 @@ jobs:
180200
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
181201
coverage: xdebug
182202

183-
- name: 'Composer: adjust dependencies'
203+
- name: "Composer: adjust dependencies"
184204
run: |
185205
# Remove dev dependencies which are not compatible with all supported PHP/PHPCS versions.
186206
composer remove --dev --no-update phpcsstandards/phpcsdevcs sirbrillig/phpcs-import-detection phpstan/phpstan

0 commit comments

Comments
 (0)