Skip to content

Commit a708263

Browse files
committed
add rector run
1 parent 3f27c93 commit a708263

File tree

4 files changed

+43
-31
lines changed

4 files changed

+43
-31
lines changed

.github/workflows/code_analysis.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
name: 'PHPStan'
3333
run: vendor/bin/phpstan
3434

35+
-
36+
name: 'Tests'
37+
run: vendor/bin/phpunit
38+
3539
name: ${{ matrix.actions.name }}
3640
runs-on: ubuntu-latest
3741
timeout-minutes: 10

.github/workflows/rector.yaml.yml

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

.github/workflows/tests.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/typos.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18-
19-
2018
- name: "Check for typos"
2119
uses: "crate-ci/typos@v1.40.0"
2220
with:

0 commit comments

Comments
 (0)