Skip to content

Commit

Permalink
test: Adding php static analysis (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
reisraff authored Oct 15, 2020
1 parent 80c733a commit cbc02c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
clean:
@rm -rf vendor composer.lock sendgrid-php.zip

php_version = `php -v | head -n 1 | cut -d " " -f 2`

install: clean
ifdef GIT_HUB_TOKEN
composer config -g github-oauth.github.com $(GIT_HUB_TOKEN)
Expand All @@ -21,6 +23,11 @@ test:
vendor/bin/phpunit test/unit --filter test*
vendor/bin/phpcs lib/*/*

ifeq ($(shell expr $(php_version) \>= 7.1), 1)
composer require --dev phpstan/phpstan
vendor/bin/phpstan analyse --no-progress --level 1 lib test
endif

test-integ: test
vendor/bin/phpunit test --filter test*

Expand Down

0 comments on commit cbc02c1

Please sign in to comment.