Skip to content

Tests

Tests #339

Workflow file for this run

name: Tests
on: [pull_request, push]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php_version: ['7.2', '7.3', '7.4', '8.0']
steps:
# prepare empty composer.json that allows the phpstan extension plugin
- run: composer init --name just/for-test --quiet
- run: composer config --no-plugins allow-plugins.phpstan/extension-installer true
- run: composer require phpstan/phpstan phpstan/extension-installer --dev
# get current *.27 version
- run: composer require symplify/phpstan-rules:^11.1.27 --dev
# prepare local files
- run: wget https://raw.githubusercontent.com/symplify/phpstan-rules/main/phpstan-for-tests.neon
- run: wget https://raw.githubusercontent.com/symplify/phpstan-rules/main/tests/SomeClass.php.inc
- run: vendor/bin/phpstan analyze SomeClass.php.inc --configuration phpstan-for-tests.neon