Merge pull request #757 from barbushin/6.x #95
This file contains hidden or 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: PHP Static Analysis & Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| static-analysis: | |
| name: Static Analysis PHP ${{ matrix.php-versions }} | |
| runs-on: ${{ matrix.operating-system }} | |
| strategy: | |
| matrix: | |
| operating-system: ['ubuntu-24.04'] | |
| php-versions: ['8.2', '8.3', '8.4', '8.5'] | |
| steps: | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: imap | |
| coverage: none | |
| - uses: actions/checkout@v4 | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate | |
| - name: Get Composer Cache Directory | |
| id: composer-cache | |
| run: | | |
| echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" | |
| - name: Cache Files | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ steps.composer-cache.outputs.dir }} | |
| **/.php_cs.cache | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Install dependencies | |
| if: steps.composer-cache.outputs.cache-hit != 'true' | |
| run: composer install --prefer-dist --no-progress --no-suggest | |
| - name: Run static analysis | |
| run: composer run static-analysis |