Skip to content

Commit e54c1af

Browse files
committed
chore: Add parallel-lint to lint downgraded source
1 parent dd65314 commit e54c1af

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,22 @@ jobs:
6060
- name: Downgrade src
6161
run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }}
6262

63-
- name: Setup PHP ${{ env.TARGET_PHP_VERSION }}
63+
- name: Reinstall PHP for PHP ${{ env.TARGET_PHP_VERSION }}
6464
uses: shivammathur/setup-php@v2
6565
with:
6666
php-version: ${{ env.TARGET_PHP_VERSION }}
6767
coverage: none
6868
env:
6969
COMPOSER_TOKEN: ${{ secrets.RELEASE_TOKEN }}
7070

71+
- name: Re-install dependencies related to testing
72+
run: |
73+
composer remove --dev nexusphp/cs-config friendsofphp/php-cs-fixer codeigniter/coding-standard -W
74+
composer update --ansi
75+
76+
- name: Run lint on src
77+
run: vendor/bin/parallel-lint src --colors --show-deprecated
78+
7179
- name: Get tag for downgraded release
7280
id: tag-downgraded
7381
run: echo "${{ format('DOWNGRADED_TAG={0}.{1}', github.ref_name, env.TARGET_PHP_VERSION_ID) }}" >> $GITHUB_OUTPUT

.github/workflows/test-phpunit.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
- '**.php'
1515
- 'phpunit.dist.xml'
1616

17+
env:
18+
TARGET_PHP_VERSION: '7.4'
19+
TARGET_PHP_VERSION_ID: 70400
20+
1721
jobs:
1822
extension-tests:
1923
name: PHPUnit Extension Tests [PHP ${{ matrix.php-version }}]
@@ -55,5 +59,24 @@ jobs:
5559
- name: Install dependencies
5660
run: composer update --ansi
5761

62+
- name: Downgrade src
63+
run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }}
64+
65+
- name: Reinstall PHP for PHP ${{ env.TARGET_PHP_VERSION }}
66+
uses: shivammathur/setup-php@v2
67+
with:
68+
php-version: ${{ env.TARGET_PHP_VERSION }}
69+
coverage: none
70+
env:
71+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Re-install dependencies related to testing
74+
run: |
75+
composer remove --dev nexusphp/cs-config friendsofphp/php-cs-fixer codeigniter/coding-standard -W
76+
composer update --ansi
77+
78+
- name: Run lint on src
79+
run: vendor/bin/parallel-lint src --colors --show-deprecated
80+
5881
- name: Run Extension Tests
5982
run: vendor/bin/phpunit --no-coverage

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"codeigniter4/shield": "^1.0@beta",
3232
"friendsofphp/php-cs-fixer": "^3.20",
3333
"nexusphp/cs-config": "^3.12",
34+
"php-parallel-lint/php-parallel-lint": "^1.3",
3435
"phpstan/extension-installer": "^1.3",
3536
"phpstan/phpstan-deprecation-rules": "^1.1",
3637
"phpstan/phpstan-phpunit": "^1.3",

0 commit comments

Comments
 (0)