Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-cs-fixer: utilize multiple processors #4674

Merged
merged 16 commits into from May 13, 2021
2 changes: 1 addition & 1 deletion .github/workflows/code-style.yml
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Fix code style
if: env.writable == 1
run: vendor/bin/php-cs-fixer fix --diff
run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 150 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich habe den eindruck..

  • parallelisierung beschleunigt den schritt hier von ca 20-22 auf 12-14 sekunden
  • der cs-fixer hat vor dem PR hier einen cache aufgebaut und diesen als seiteneffekt in zeile 53 genutzt - jetzt scheinbar nicht mehr
  • cs-fixer parallel laufen zu lassen und anschließend die ausgabe durch cs2pr pipen, scheint aktuell nicht möglich

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • der cs-fixer hat vor dem PR hier einen cache aufgebaut und diesen als seiteneffekt in zeile 53 genutzt - jetzt scheinbar nicht mehr

Irgendwo hatte ich es schon mal angemerkt, dieser Zweit-Check ist aus meiner Sicht eigentlich überflüssig.
Denn wenn hier etwas gefixt und commitet wird, wird anschließend ja sowieso die ganze Action neu gestartet.
Wir brauchen den dry-mode mit cs2pr aber trotzdem für Fork/Dependabot-PRs. Aber er muss nicht ablaufen, wenn schon hier der fix-Schritt ablief.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok super.


- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down