Introduce README #9
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| Build: | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis:8-alpine | |
| ports: | |
| - "6379:6379" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-versions: | |
| - '8.1' | |
| - '8.2' | |
| - '8.3' | |
| - '8.4' | |
| - '8.5' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: mbstring redis | |
| ini-values: memory-limit=1G | |
| tools: cs2pr | |
| - name: Get Composer's cache directory | |
| id: composer-cache-path | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| id: composer-cache | |
| with: | |
| path: ${{ steps.composer-cache-path.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install dependencies | |
| run: composer install | |
| - name: Normalize composer.json | |
| if: matrix.php-versions == '8.1' | |
| run: composer normalize --dry-run | |
| - name: PHP-CS-Fixer | |
| if: matrix.php-versions == '8.1' | |
| run: vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr | |
| - name: PHPStan | |
| if: matrix.php-versions == '8.1' | |
| run: vendor/bin/phpstan analyse | |
| # https://github.com/marketplace/actions/setup-php-action#phpunit | |
| - name: Setup problem matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: PHPUnit Unit | |
| run: vendor/bin/phpunit | |
| - name: PHPUnit Integrational | |
| run: vendor/bin/phpunit --group integrational |