Skip to content

[FEATURE] Add Rule generator #479

[FEATURE] Add Rule generator

[FEATURE] Add Rule generator #479

name: "Code style & tests"
on:
pull_request:
# Run this workflow for all PRs against main
branches:
- main
env:
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361
COMPOSER_ROOT_VERSION: "dev-main"
jobs:
php-packages-check:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
composer-command:
- name: PHP Code Style
command: 'style:php:check'
- name: Composer normalize
command: 'style:composer:normalize'
- name: PHPStan
command: analyze:php
- name: PHPUnit
command: test:php
- name: Rector
command: 'rector'
dependency-versions:
- name: Newest
parameter: 'highest'
- name: Oldest
parameter: 'lowest'
name: ${{ matrix.composer-command.name }}/${{ matrix.dependency-versions.name }} deps
steps:
- name: "Checkout"
uses: actions/checkout@v4
# see https://github.com/shivammathur/setup-php
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
# see https://github.com/ramsey/composer-install
- name: "Install Composer dependencies"
uses: ramsey/composer-install@v3
with:
dependency-versions: '${{ matrix.dependency-versions.parameter }}'
- name: 'Run check "${{ matrix.composer-command.name }}"'
run: composer ${{ matrix.composer-command.command }}
e2e-tests:
runs-on: ubuntu-latest
name: End to end tests
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Run tests
working-directory: e2e
run: ./run-test.sh