Skip to content

Commit

Permalink
Add basic phpstan level 1 config/ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jul 22, 2021
1 parent f7cf6cc commit f798d7b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "PHPStan"

on:
- push
- pull_request

env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"

jobs:
tests:
name: "PHPStan"

runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "intl, zip"
ini-values: "memory_limit=-1"
php-version: "7.4"

- name: "Update dependencies"
run: "composer update ${{ env.COMPOSER_FLAGS }}"

- name: Run PHPStan
run: |
composer require --dev phpstan/phpstan:^0.12.93 marc-mabe/php-enum-phpstan ${{ env.COMPOSER_FLAGS }}
vendor/bin/phpstan analyse
8 changes: 8 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
parameters:
level: 1
paths:
- ./src/
ignoreErrors: []

includes:
- vendor/marc-mabe/php-enum-phpstan/extension.neon

0 comments on commit f798d7b

Please sign in to comment.