From 74e8796f958b31d48b5ce9ae3efb967e9de2d3b9 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 16 Jan 2026 14:49:25 +0100 Subject: [PATCH] add rector run --- .github/workflows/code_analysis.yaml | 4 +++ .github/workflows/rector.yaml.yml | 39 ++++++++++++++++++++++++++++ .github/workflows/tests.yaml | 29 --------------------- 3 files changed, 43 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/rector.yaml.yml delete mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/code_analysis.yaml b/.github/workflows/code_analysis.yaml index b5971cf9..ae06c8ca 100644 --- a/.github/workflows/code_analysis.yaml +++ b/.github/workflows/code_analysis.yaml @@ -32,6 +32,10 @@ jobs: name: 'PHPStan' run: vendor/bin/phpstan + - + name: 'Tests' + run: vendor/bin/phpunit + name: ${{ matrix.actions.name }} runs-on: ubuntu-latest diff --git a/.github/workflows/rector.yaml.yml b/.github/workflows/rector.yaml.yml new file mode 100644 index 00000000..267bab2c --- /dev/null +++ b/.github/workflows/rector.yaml.yml @@ -0,0 +1,39 @@ +# github action that checks code with Rector +name: Rector + +on: + pull_request: null + +env: + # see https://github.com/composer/composer/issues/9368#issuecomment-718112361 + COMPOSER_ROOT_VERSION: "dev-main" + +jobs: + rector: + runs-on: ubuntu-latest + if: github.event.pull_request.head.repo.full_name == 'rectorphp/rector-symfony' + steps: + - + if: github.event.pull_request.head.repo.full_name == github.repository + uses: actions/checkout@v4 + with: + # Must be used to trigger workflow after push + token: ${{ secrets.ACCESS_TOKEN }} + + - + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + coverage: none + + - uses: "ramsey/composer-install@v2" + + - run: vendor/bin/rector --ansi + + - + # commit only to core contributors who have repository access + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: '[rector] Rector fixes' + commit_author: 'GitHub Action ' + commit_user_email: 'action@github.com' diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml deleted file mode 100644 index a281116d..00000000 --- a/.github/workflows/tests.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: 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: - tests: - runs-on: ubuntu-latest - - name: Tests - steps: - - uses: actions/checkout@v4 - - - - uses: shivammathur/setup-php@v2 - with: - php-version: 8.3 - coverage: none - - - uses: "ramsey/composer-install@v2" - - - run: vendor/bin/phpunit