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

Commit

Permalink
ci: fix Psalm & Redis IGBinary issue (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerotire authored Jun 26, 2024
1 parent 487182b commit bdae67b
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 1 deletion.
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/[email protected]
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}

0 comments on commit bdae67b

Please sign in to comment.