name: PHP static analysis ✨ on: [push, pull_request] jobs: build: name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} runs-on: ubuntu-18.04 strategy: fail-fast: false matrix: operating-system: [ubuntu-latest] php-versions: ['7.4'] steps: - name: Checkout uses: actions/checkout@v2 - name: Setup PHP, with composer and extensions uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, dom, gd, json, soap, zip, bcmath ini-values: post_max_size=256M, max_execution_time=600, memory_limit=4096M - name: Get composer cache directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache composer dependencies uses: actions/cache@v2 with: path: ${{ steps.composer-cache.outputs.dir }} # Use composer.json for key, if composer.lock is not committed. # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: ${{ runner.os }}-composer- - name: Install dependencies with composer run: composer install --prefer-dist --no-progress --optimize-autoloader - name: Check Symfony requirements run: vendor/bin/requirements-checker - name: Psalm id: psalm run: vendor/bin/psalm --show-info=false - name: PhpStan if: (${{ success() }} || ${{ steps.psalm.outcome }} == 'failure') run: vendor/bin/phpstan analyse