Skip to content

Commit b3c337a

Browse files
committed
Add Rector to GitHub CI jobs
Signed-off-by: Tim Goudriaan <tim@codedmonkey.com>
1 parent 722e897 commit b3c337a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/linting.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,38 @@ jobs:
6363
# if: always() && steps.composer-install.outcome == 'success'
6464
# run: bin/console lint:xliff translations --ansi
6565

66+
rector:
67+
name: Rector
68+
69+
runs-on: ubuntu-latest
70+
71+
steps:
72+
- name: Checkout code
73+
uses: actions/checkout@v4
74+
75+
- name: Install PHP with extensions
76+
uses: shivammathur/setup-php@v2
77+
with:
78+
php-version: 8.3
79+
tools: composer:v2
80+
81+
- name: Set Composer cache directory
82+
id: composer-cache
83+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
84+
85+
- name: Cache Composer output
86+
uses: actions/cache@v4
87+
with:
88+
path: ${{ steps.composer-cache.outputs.dir }}
89+
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
90+
restore-keys: ${{ runner.os }}-composer-
91+
92+
- name: Install Composer dependencies
93+
run: composer install --ansi --no-interaction --no-progress
94+
95+
- name: Run Rector
96+
run: vendor/bin/rector process --dry-run --ansi --no-progress-bar
97+
6698
php-cs-fixer:
6799
name: PHP-CS-Fixer
68100

0 commit comments

Comments
 (0)