Skip to content

Commit

Permalink
Adding phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
pdrillin committed Jan 21, 2021
1 parent a31ddd5 commit c624049
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/php-stan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: PHPStan
on:
push:
branches:
- master
pull_request:
branches:
- master

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

- name: Get composer cache directory
id: get-composer-cache-dir
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: phpstan

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.get-composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run PHPStan
run: phpstan analyse -c php-stan.neon
7 changes: 7 additions & 0 deletions php-stan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
scanDirectories:
- adresse/
level: 0
ignoreErrors:
paths:
- adresse/

0 comments on commit c624049

Please sign in to comment.