Skip to content

fix: github workflow #2

fix: github workflow

fix: github workflow #2

Workflow file for this run

name: PHP Workflow
on:
push:
branches: [ "master" ]
permissions:
contents: read
jobs:
main:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.1, 8.2, 8.3 ]
stability: [ prefer-lowest, prefer-stable ]
steps:
- uses: actions/checkout@v4
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Audit dependencies
run: composer audit
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: lzf, zstd, lz4, gmp, :php-psr
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- name: PHPStan
run: ./vendor/bin/phpstan analyse --error-format github --level=max src
- name: PHP-CS-Fixer
run: ./vendor/bin/php-cs-fixer --format=json check
- name: Pest
run: XDEBUG_MODE=coverage ./vendor/bin/pest --coverage --coverage-clover=coverage.xml