refactor: Use custom command #6
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: Code Analysis | |
on: | |
pull_request: null | |
push: | |
branches: | |
- develop | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
code_analysis: | |
strategy: | |
fail-fast: false | |
matrix: | |
actions: | |
- name: 'PHPStan' | |
run: composer phpstan | |
- name: 'Coding Standards' | |
run: composer fix-cs | |
name: ${{ matrix.actions.name }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
- uses: php-actions/composer@v6 | |
with: | |
php_version: "8.2" | |
php_extensions: ctype curl dom iconv imagick intl json mbstring openssl pcre pdo reflection spl zip | |
command: ${{ matrix.actions.run }} |