Skip to content

rozeo/phpstan-github-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpstan-github-actions

PHPStan support for Github Pull Request On Github Actions

Output Sample #1 (comment)

Setup

  1. add dependecy in composer.json
"rozeo/phpstan-github-actions": "^1.0.0"
  1. put phpstan.neon setting file on repository root.
touch phpstan.neon
  1. setting phpstan and add phpstan custom formatter. ex.)
parameters:
	level: 5
	paths:
		- src

services:
    errorFormatter.markdown:
    	class: Rozeo\PHPStanAction\PHPStanMarkdownFormatter
  1. add rules on workflow file(based php workflow).
on:
  pull_request:
    branches:
      - branch
~~~
- name: composer install
  run: composer install
  
- name: running phpstan
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    GITHUB_URL: ${{ github.event.pull_request.comments_url }}
    GITHUB_SHA: ${{ github.sha }}
    GITHUB_REPOSITORY: ${{ github.repository }}
  run: ./vendor/bin/phpstan-github-actions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages