Skip to content

fix Dockerfile failure and simplify PHP extension installation #74

fix Dockerfile failure and simplify PHP extension installation

fix Dockerfile failure and simplify PHP extension installation #74

name: Static Analysis
on: [ push, pull_request, workflow_dispatch ]
jobs:
static-analysis:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
extensions: redis-stable, swoole-5.1.1
ini-values: swoole.enable_library=off
coverage: none
env:
SWOOLE_CONFIGURE_OPTS: --enable-mysqlnd --enable-swoole-pgsql --enable-openssl --enable-sockets --enable-swoole-curl
- name: Install PHPStan
uses: nick-invision/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer require phpstan/phpstan=~1.11.0 -n -q --no-progress
- name: Run Static Analysis
run: ./vendor/bin/phpstan analyse --no-progress --memory-limit 2G