feat: new v4 version (#5)

This commit is contained in:
2024-03-04 22:02:49 +00:00
committed by GitHub
parent f1b14d4d40
commit 8d5b060acf
28 changed files with 5385 additions and 522 deletions

51
.github/workflows/php.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: "PHP Checks"
on:
workflow_call:
inputs:
php-version:
description: 'The version of PHP to use'
default: '8.2'
type: string
composer-cmd:
description: 'Command to install dependencies'
type: string
default: 'install --ansi --no-interaction --no-progress --no-suggest --prefer-dist'
jobs:
php-checks:
name: "PHP Checks"
runs-on: ubuntu-latest
steps:
- name: "Checkout Code"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{ inputs.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "${{ runner.os }}-composer-"
- name: "Install dependencies"
run: "composer ${{ inputs.composer-cmd }}"
- name: "Check Code Style"
run: "composer fmt:check"
- name: "Run Psalm"
run: "composer psalm:gh"
- name: "Run Test Suite"
run: "composer test"
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.dev/coverage'