chore(release): v1.0.1 #9
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 Workflow | |
on: | |
push: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [ 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: xdebug | |
- 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 | |
uses: php-actions/phpstan@v3 | |
with: | |
php_version: ${{ matrix.php }} | |
level: max | |
error_format: github | |
path: 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 |