Skip to content

Commit 8d5f04c

Browse files
committed
Setup rector in CI
1 parent f9081ff commit 8d5f04c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/rector.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# github action that checks code with Rector
2+
name: Rector
3+
4+
on:
5+
pull_request: null
6+
7+
jobs:
8+
rector:
9+
runs-on: ubuntu-latest
10+
steps:
11+
-
12+
if: github.event.pull_request.head.repo.full_name == github.repository
13+
uses: actions/checkout@v3
14+
with:
15+
# Must be used to trigger workflow after push
16+
token: ${{ secrets.ACCESS_TOKEN }}
17+
18+
-
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: 8.1
22+
coverage: none
23+
24+
- uses: "ramsey/composer-install@v2"
25+
26+
- run: vendor/bin/rector --ansi
27+
28+
-
29+
# commit only to core contributors who have repository access
30+
uses: stefanzweifel/git-auto-commit-action@v4
31+
with:
32+
commit_message: '[rector] Rector fixes'
33+
commit_author: 'GitHub Action <[email protected]>'
34+
commit_user_email: '[email protected]'

0 commit comments

Comments
 (0)