Skip to content

Commit 45e59e8

Browse files
authored
Merge pull request #62 from PHPCSStandards/feature/various-ci-updates
CI: various updates
2 parents 9c8327a + 0ebff07 commit 45e59e8

File tree

4 files changed

+37
-6
lines changed

4 files changed

+37
-6
lines changed

.github/workflows/cs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88
# Allow manually triggering the workflow.
99
workflow_dispatch:
1010

11+
# Cancels all previous workflow runs for the same branch that have not yet completed.
12+
concurrency:
13+
# The concurrency group contains the workflow name and the branch name.
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
1117
jobs:
1218
checkcs:
1319
name: 'Basic CS and QA checks'

.github/workflows/quicktest.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88
# Allow manually triggering the workflow.
99
workflow_dispatch:
1010

11+
# Cancels all previous workflow runs for the same branch that have not yet completed.
12+
concurrency:
13+
# The concurrency group contains the workflow name and the branch name.
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
1117
jobs:
1218
#### QUICK TEST STAGE ####
1319
# This is a much quicker test which only runs the unit tests and linting against the low/high
@@ -43,7 +49,7 @@ jobs:
4349
if [ "${{ matrix.phpcs_version }}" != "dev-master" ]; then
4450
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On'
4551
else
46-
echo '::set-output name=PHP_INI::error_reporting=E_ALL, display_errors=On'
52+
echo '::set-output name=PHP_INI::error_reporting=-1, display_errors=On'
4753
fi
4854
4955
- name: Install PHP

.github/workflows/test.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ on:
99
# Allow manually triggering the workflow.
1010
workflow_dispatch:
1111

12+
# Cancels all previous workflow runs for the same branch that have not yet completed.
13+
concurrency:
14+
# The concurrency group contains the workflow name and the branch name.
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
1218
jobs:
1319
#### TEST STAGE ####
1420
test:
@@ -23,12 +29,20 @@ jobs:
2329
# - PHP 7.3 needs PHPCS 3.3.1+ to run without errors.
2430
# - PHP 7.4 needs PHPCS 3.5.0+ to run without errors.
2531
# - PHP 8.0 needs PHPCS 3.5.7+ to run without errors.
32+
# - PHP 8.1 needs PHPCS 3.6.1+ to run without errors.
2633
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2']
2734
phpcs_version: ['3.1.0', 'dev-master']
2835
experimental: [false]
2936

3037
include:
3138
# Complete the matrix, while preventing issues with PHPCS versions incompatible with certain PHP versions.
39+
- php: '8.1'
40+
phpcs_version: 'dev-master'
41+
experimental: false
42+
- php: '8.1'
43+
phpcs_version: '3.6.1'
44+
experimental: false
45+
3246
- php: '8.0'
3347
phpcs_version: 'dev-master'
3448
experimental: false
@@ -55,7 +69,7 @@ jobs:
5569
phpcs_version: '4.0.x-dev'
5670
experimental: true
5771

58-
- php: '8.1' # Nightly.
72+
- php: '8.2' # Nightly.
5973
phpcs_version: 'dev-master'
6074
experimental: true
6175

@@ -75,7 +89,7 @@ jobs:
7589
if [[ "${{ matrix.phpcs_version }}" != "dev-master" && "${{ matrix.phpcs_version }}" != "4.0.x-dev" ]]; then
7690
echo '::set-output name=PHP_INI::error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On'
7791
else
78-
echo '::set-output name=PHP_INI::error_reporting=E_ALL, display_errors=On'
92+
echo '::set-output name=PHP_INI::error_reporting=-1, display_errors=On'
7993
fi
8094
8195
- name: Install PHP
@@ -96,12 +110,12 @@ jobs:
96110
# Install dependencies and handle caching in one go.
97111
# @link https://github.com/marketplace/actions/install-composer-dependencies
98112
- name: Install Composer dependencies - normal
99-
if: ${{ matrix.php < 8.1 }}
113+
if: ${{ matrix.php < 8.2 }}
100114
uses: "ramsey/composer-install@v1"
101115

102116
# For PHP "nightly", we need to install with ignore platform reqs as not all dependencies allow installation.
103117
- name: Install Composer dependencies - with ignore platform
104-
if: ${{ matrix.php >= 8.1 }}
118+
if: ${{ matrix.php >= 8.2 }}
105119
uses: "ramsey/composer-install@v1"
106120
with:
107121
composer-options: --ignore-platform-reqs

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@
2929
"phpunit/phpunit" : "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
3030
"php-parallel-lint/php-parallel-lint": "^1.3.1",
3131
"php-parallel-lint/php-console-highlighter": "^0.5",
32-
"phpcsstandards/phpcsdevcs": "^1.1.1",
32+
"phpcsstandards/phpcsdevcs": "^1.1.3",
3333
"phpcsstandards/phpcsutils" : "^1.0"
3434
},
35+
"config": {
36+
"allow-plugins": {
37+
"dealerdirect/phpcodesniffer-composer-installer": true
38+
}
39+
},
3540
"bin": [
3641
"bin/phpcs-check-feature-completeness"
3742
],

0 commit comments

Comments
 (0)