Skip to content

Commit f798d7b

Browse files
committed
Add basic phpstan level 1 config/ci
1 parent f7cf6cc commit f798d7b

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/phpstan.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "PHPStan"
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
env:
8+
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
9+
10+
jobs:
11+
tests:
12+
name: "PHPStan"
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: "Checkout"
18+
uses: "actions/checkout@v2"
19+
20+
- name: "Install PHP"
21+
uses: "shivammathur/setup-php@v2"
22+
with:
23+
coverage: "none"
24+
extensions: "intl, zip"
25+
ini-values: "memory_limit=-1"
26+
php-version: "7.4"
27+
28+
- name: "Update dependencies"
29+
run: "composer update ${{ env.COMPOSER_FLAGS }}"
30+
31+
- name: Run PHPStan
32+
run: |
33+
composer require --dev phpstan/phpstan:^0.12.93 marc-mabe/php-enum-phpstan ${{ env.COMPOSER_FLAGS }}
34+
vendor/bin/phpstan analyse

phpstan.neon

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
parameters:
2+
level: 1
3+
paths:
4+
- ./src/
5+
ignoreErrors: []
6+
7+
includes:
8+
- vendor/marc-mabe/php-enum-phpstan/extension.neon

0 commit comments

Comments
 (0)