Skip to content

Commit

Permalink
chore: Add parallel-lint to lint downgraded source (#16)
Browse files Browse the repository at this point in the history
paulbalandan authored Nov 17, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 0acb40e commit 39119f4
Showing 3 changed files with 13 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -60,13 +60,8 @@ jobs:
- name: Downgrade src
run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }}

- name: Setup PHP ${{ env.TARGET_PHP_VERSION }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.TARGET_PHP_VERSION }}
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Run lint on src
run: vendor/bin/parallel-lint src --colors --show-deprecated

- name: Get tag for downgraded release
id: tag-downgraded
10 changes: 10 additions & 0 deletions .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
@@ -14,6 +14,10 @@ on:
- '**.php'
- 'phpunit.dist.xml'

env:
TARGET_PHP_VERSION: '7.4'
TARGET_PHP_VERSION_ID: 70400

jobs:
extension-tests:
name: PHPUnit Extension Tests [PHP ${{ matrix.php-version }}]
@@ -55,5 +59,11 @@ jobs:
- name: Install dependencies
run: composer update --ansi

- name: Downgrade src
run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }}

- name: Run lint on src
run: vendor/bin/parallel-lint src --colors --show-deprecated

- name: Run Extension Tests
run: vendor/bin/phpunit --no-coverage
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@
"codeigniter4/shield": "^1.0@beta",
"friendsofphp/php-cs-fixer": "^3.20",
"nexusphp/cs-config": "^3.12",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",

0 comments on commit 39119f4

Please sign in to comment.