Monorepo v6 refactoring: EasySwoole #2525
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: PHP-CI | |
on: [push, pull_request] | |
jobs: | |
coding_standards: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: ['8.2'] | |
actions: | |
- {name: composer, run: make check-composer} | |
- {name: monorepo, run: make check-monorepo} | |
- {name: security, run: make check-security} | |
- {name: ecs, run: make check-ecs, cache: ecs} | |
- {name: rector, run: make check-rector, cache: rector} | |
- {name: phpstan, run: make check-phpstan, cache: phpstan} | |
name: ${{ matrix.actions.name }} (${{ matrix.php }}) | |
env: | |
PHP_EXTENSIONS: pdo_sqlite, openswoole, pkcs11 | |
PHP_EXTENSIONS_CACHE_KEY: cache-extensions-pdo_sqlite-openswoole-pkcs11 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup cache environment | |
id: cache-extensions | |
uses: shivammathur/cache-extensions@v1 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: ${{ env.PHP_EXTENSIONS }} | |
key: ${{ env.PHP_EXTENSIONS_CACHE_KEY }} | |
- name: Cache extensions | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.cache-extensions.outputs.dir }} | |
key: ${{ steps.cache-extensions.outputs.key }} | |
restore-keys: ${{ steps.cache-extensions.outputs.key }} | |
- name: Setup PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: ${{ matrix.actions.coverage || 'none' }} | |
extensions: ${{ env.PHP_EXTENSIONS }} | |
- name: Install Composer dependencies | |
uses: ramsey/composer-install@v3 | |
- name: Install Composer dependencies for Quality Tools | |
uses: ramsey/composer-install@v3 | |
with: | |
working-directory: quality | |
- if: matrix.actions.cache | |
id: cache-quality-tools | |
uses: actions/cache@v4 | |
with: | |
path: quality/var/cache/${{ matrix.actions.cache }} | |
key: ${{ runner.os }}-${{ matrix.php }}-quality-${{ matrix.actions.name }}-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-${{ matrix.php }}-quality-${{ matrix.actions.name }}- | |
- if: matrix.actions.cache && steps.cache-quality-tools.outputs.cache-hit == false | |
run: mkdir -p ${{ matrix.actions.cache }} | |
- name: '[CI] Check ${{ matrix.actions.name }} [CI]' | |
run: ${{ matrix.actions.run }} | |
shell: bash |