Upgrade to PHPParser 5 and PHPStan 2 #34288
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# builds the content of https://github.com/rectorphp/rector-prefixed | |
# inspiration from https://github.com/phpstan/phpstan-src/blob/master/.github/workflows/phar.yml | |
name: Packages Tests | |
on: | |
pull_request: null | |
push: | |
branches: | |
- main | |
env: | |
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361 | |
COMPOSER_ROOT_VERSION: "dev-main" | |
jobs: | |
packages_tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
strategy: | |
fail-fast: false | |
matrix: | |
repository_name: | |
# must be repository name, e.g. https://github.com/rectorphp/rector-symfony | |
- rectorphp/rector-symfony | |
- rectorphp/rector-phpunit | |
- rectorphp/rector-doctrine | |
- rectorphp/rector-downgrade-php | |
actions: | |
- | |
name: 'Unit Tests' | |
run: vendor/bin/phpunit | |
- | |
name: 'PHPStan' | |
run: vendor/bin/phpstan | |
steps: | |
# see https://github.com/actions/checkout#usage | |
- | |
uses: "actions/checkout@v4" | |
with: | |
repository: ${{ matrix.repository_name }} | |
ref: "main" | |
- | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
coverage: none | |
- run: composer config minimum-stability dev | |
# temporary for PR 6431 as rector/rector-* packages already require this PR branch | |
# so avoid pointed to rector-src main branch composer.json | |
- name: Conditionally to not require rector/rector-src on PR 6431 | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
if [ "${{ github.event.pull_request.number }}" != "6431" ]; then | |
composer require rector/rector-src dev-main#${{ github.event.pull_request.head.sha }} --no-update | |
fi | |
# # test with current commit in a pull-request | |
# - | |
# run: composer require rector/rector-src dev-main#${{github.event.pull_request.head.sha}} --no-update | |
# if: ${{ github.event_name == 'pull_request' }} | |
- run: composer install --ansi | |
- run: ${{ matrix.actions.run }} |