Skip to content

Commit

Permalink
Add phpstan check
Browse files Browse the repository at this point in the history
  • Loading branch information
gms8994 committed Nov 18, 2020
1 parent 4607325 commit 30a8914
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PhpStan

on:
push:
paths:
- "**.php"

jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Run composer require
run: composer require -n --prefer-dist

- name: Run phpstan
run: ./vendor/bin/phpstan analyze --level 2 src
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
},
"require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^8.0",
"orchestra/testbench": "^4.0"
"orchestra/testbench": "^4.0",
"phpstan/phpstan": "^0.12.56"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 30a8914

Please sign in to comment.