Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

fix: Psalm & Redis IGBinary issue #197

Merged
merged 14 commits into from
Jun 26, 2024
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

static-analysis:
uses: dvsa/.github/.github/workflows/php-static.yml@main
uses: ./.github/workflows/static-analysis.yaml
with:
php-version: '8.2'

Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Static analysis

on:
workflow_call:
inputs:
php-version:
required: false
type: string
default: 'latest'
composer-version:
required: false
type: string
default: 'v2'

jobs:
phpstan:

name: PHPStan - ${{ inputs.php-version }}
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
coverage: none
tools: phpstan, composer:${{ inputs.composer-version }}

- name: Install Composer dependancies
run: composer install --no-progress --no-interaction

- name: Execute PHPStan
run: phpstan analyze --no-progress

php-codesniffer:

name: PHP-CodeSniffer - ${{ inputs.php-version }}
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
coverage: none
tools: php-cs-fixer, phpcs, composer:${{ inputs.composer-version }}

- name: Install Composer dependancies
run: composer install --no-progress --no-interaction

- name: Execute PHP CodeSniffer
run: phpcs -q

psalm:

name: Psalm - ${{ inputs.php-version }}
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
coverage: none
extensions: mbstring, intl, redis-phpredis/phpredis@6.0.2
tools: vimeo/psalm, composer:${{ inputs.composer-version }}
env:
REDIS_CONFIGURE_OPTS: --enable-redis-igbinary

- name: Install Composer dependancies
run: composer install --no-progress --no-interaction

- name: Execute Psalm
run: psalm --no-progress --output-format=github --root=${GITHUB_WORKSPACE}
Loading