* fix not saving action/cache
after failed jobs @ actions/{be,fe,c#…
#9
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: be | |
on: | |
push: | |
#paths: [be/**] | |
defaults: | |
run: | |
working-directory: be | |
jobs: | |
phpstan: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/be | |
- run: ./vendor/bin/phpstan analyse --error-format=github | |
psalm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/be | |
- run: ./vendor/bin/psalm --output-format=github | |
phpcs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/be | |
- id: run | |
run: ./vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml . | |
- if: always() && steps.run.outcome == 'failure' | |
run: cs2pr ./phpcs-report.xml | |
# https://github.com/staabm/annotate-pull-request-from-checkstyle | |
pint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/be | |
- id: run | |
run: ./vendor/bin/pint --test | |
- if: failure() && steps.run.outcome != 'success' | |
run: ./vendor/bin/pint --test --format=checkstyle | cs2pr | |
php-cs-fixer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/be | |
- run: ./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle . | cs2pr | |
phpmd: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/be | |
- run: ./vendor/bin/phpmd . github cleancode,codesize,controversial,design,naming,unusedcode --exclude vendor # https://github.com/phpmd/phpmd/issues/506 |