Add ClassDependencyTree rule #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rector | |
on: | |
pull_request: null | |
jobs: | |
rector: | |
# Don't run on forks. | |
if: github.repository == 'tomasvotruba/cognitive-complexity' | |
runs-on: ubuntu-latest | |
steps: | |
- | |
uses: actions/checkout@v3 | |
with: | |
# Must be used to trigger workflow after push | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
coverage: none | |
- uses: "ramsey/composer-install@v2" | |
## First run Rector - here can't be --dry-run !!! it would stop the job with it and not commit anything in the future | |
- run: vendor/bin/rector --ansi | |
- run: vendor/bin/ecs check --fix --ansi | |
# see https://github.com/EndBug/add-and-commit | |
- | |
# commit only to core contributors who have repository access | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
uses: EndBug/[email protected] | |
with: | |
# The arguments for the `git add` command (see the paragraph below for more info) | |
add: . | |
message: "[ci-review] Rector Rectify" | |
author_name: "GitHub Action" | |
author_email: "[email protected]" | |
env: | |
# to get push access | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |