diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13ab380..91a38c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,7 +60,7 @@ jobs: - name: Downgrade src run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }} - - name: Setup PHP ${{ env.TARGET_PHP_VERSION }} + - name: Reinstall PHP for PHP ${{ env.TARGET_PHP_VERSION }} uses: shivammathur/setup-php@v2 with: php-version: ${{ env.TARGET_PHP_VERSION }} @@ -68,6 +68,14 @@ jobs: env: COMPOSER_TOKEN: ${{ secrets.RELEASE_TOKEN }} + - name: Re-install dependencies related to testing + run: | + composer remove --dev nexusphp/cs-config friendsofphp/php-cs-fixer codeigniter/coding-standard -W + composer update --ansi + + - name: Run lint on src + run: vendor/bin/parallel-lint src --colors --show-deprecated + - name: Get tag for downgraded release id: tag-downgraded run: echo "${{ format('DOWNGRADED_TAG={0}.{1}', github.ref_name, env.TARGET_PHP_VERSION_ID) }}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/test-phpunit.yml b/.github/workflows/test-phpunit.yml index e00a987..fc9a439 100644 --- a/.github/workflows/test-phpunit.yml +++ b/.github/workflows/test-phpunit.yml @@ -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,24 @@ jobs: - name: Install dependencies run: composer update --ansi + - name: Downgrade src + run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }} + + - name: Reinstall PHP for PHP ${{ env.TARGET_PHP_VERSION }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ env.TARGET_PHP_VERSION }} + coverage: none + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Re-install dependencies related to testing + run: | + composer remove --dev nexusphp/cs-config friendsofphp/php-cs-fixer codeigniter/coding-standard -W + composer update --ansi + + - name: Run lint on src + run: vendor/bin/parallel-lint src --colors --show-deprecated + - name: Run Extension Tests run: vendor/bin/phpunit --no-coverage diff --git a/composer.json b/composer.json index f96860f..ea3728e 100644 --- a/composer.json +++ b/composer.json @@ -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",