Skip to content

Commit 33832b7

Browse files
committed
ci: add rector
1 parent 586340b commit 33832b7

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,45 @@ jobs:
7474
- name: Run PHP-CS-Fixer fix
7575
run: php-cs-fixer fix --dry-run --diff --ansi --show-progress=none
7676

77+
rector:
78+
name: Rector (PHP ${{ matrix.php }})
79+
runs-on: ubuntu-latest
80+
timeout-minutes: 20
81+
strategy:
82+
matrix:
83+
php:
84+
- '8.3'
85+
fail-fast: false
86+
steps:
87+
- name: Checkout
88+
uses: actions/checkout@v6
89+
- name: Setup PHP
90+
uses: shivammathur/setup-php@v2
91+
with:
92+
php-version: ${{ matrix.php }}
93+
extensions: intl, bcmath, curl, openssl, mbstring, mongodb
94+
ini-values: memory_limit=-1
95+
tools: composer
96+
coverage: none
97+
- name: Get composer cache directory
98+
id: composercache
99+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
100+
- name: Cache dependencies
101+
uses: actions/cache@v5
102+
with:
103+
path: ${{ steps.composercache.outputs.dir }}
104+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
105+
restore-keys: ${{ runner.os }}-composer-
106+
- name: Update project dependencies
107+
run: |
108+
composer global require soyuka/pmu
109+
composer global config allow-plugins.soyuka/pmu true --no-interaction
110+
composer global link .
111+
- name: Install Rector
112+
run: composer require --dev rector/rector
113+
- name: Run Rector
114+
run: ./vendor/bin/rector process --dry-run --ansi --no-progress-bar
115+
77116
lint-container:
78117
name: Lint Container
79118
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)