Skip to content

Commit

Permalink
Move coverage to Travis file
Browse files Browse the repository at this point in the history
  • Loading branch information
Abban committed Mar 10, 2021
1 parent 4701550 commit a12c855
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ install:
- travis_retry composer install --prefer-dist --no-interaction --ignore-platform-reqs

script:
- make ci-with-coverage
- make ci
- make install-php COMPOSER_FLAGS="--no-dev -q" # Remove dev dependencies to make sure PHPStan creates errors if prod code depends on dev classes
- docker run -v $PWD:/app --rm ghcr.io/phpstan/phpstan analyse --level 5 --no-progress src/ # Can't use "make stan" because stan was removed

after_success:
- vendor/bin/phpunit --coverage-clover coverage.clover
Expand Down
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,20 @@ update-php:

ci: phpunit cs stan

ci-with-coverage: phpunit-with-coverage cs stan

test: phpunit

phpunit:
docker-compose run --rm --no-deps app ./vendor/bin/phpunit

phpunit-with-coverage:
docker-compose run --rm --no-deps -e XDEBUG_MODE=coverage app ./vendor/bin/phpunit

cs:
docker-compose run --rm --no-deps app ./vendor/bin/phpcs

fix-cs:
docker-compose run --rm --no-deps app ./vendor/bin/phpcbf

stan:
docker-compose run --rm --no-deps app php -d memory_limit=1G vendor/bin/phpstan analyse --level=5 --no-progress src/ tests/
docker-compose run --rm --no-deps app php -d memory_limit=1G vendor/bin/phpstan analyse --level=5 -c phpstan.test.neon --no-progress src/ tests/

setup: install-php

.PHONY: install-php update-php ci ci-with-coverage test phpunit phpunit-with-coverage cs fix-cs stan setup
.PHONY: install-php update-php ci test phpunit cs fix-cs stan setup
File renamed without changes.

0 comments on commit a12c855

Please sign in to comment.