Skip to content

Fix tests

Fix tests #47

name: Static analysis
on:
push:
paths:
- **.php

Check failure on line 6 in .github/workflows/static-analysis.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/static-analysis.yml

Invalid workflow file

You have an error in your yaml syntax on line 6
- phpstan.neon.dist
jobs:
static-analysis:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1, '8.2']
stability: [prefer-stable]
name: Static Analysis P${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.stability }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.os }}-${{ matrix.php }}-${{ matrix.stability }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.php }}-${{ matrix.stability }}-composer-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip
tools: composer:v2
coverage: none
- name: Install Composer dependencies
run: composer update --${{ matrix.stability }} --no-interaction --prefer-dist
- name: Run PHPStan
run: ./vendor/bin/phpstan analyse --ansi --error-format=github