Skip to content

Commit

Permalink
Merge pull request #11 from jasny/v2.x
Browse files Browse the repository at this point in the history
Version 2
  • Loading branch information
jasny committed Dec 4, 2019
2 parents 728b99a + b595f93 commit 1a2c537
Show file tree
Hide file tree
Showing 52 changed files with 4,053 additions and 1,999 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/phpcs.xml.dist export-ignore
/phpstan.neon export-ignore
/README.md export-ignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor
/composer.lock
.phpunit.result.cache
24 changes: 24 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#language: php
checks:
php: true
filter:
excluded_paths:
- tests
build:
nodes:
analysis:
environment:
php: 7.4
postgresql: false
redis: false
mongodb: false
tests:
override:
- phpcs-run src
-
command: vendor/bin/phpstan analyze --error-format=checkstyle | sed '/^\s*$/d' > phpstan-checkstyle.xml
analysis:
file: phpstan-checkstyle.xml
format: 'general-checkstyle'
- php-scrutinizer-run

40 changes: 32 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
language: php

php:
- 5.6
- 7.0
- 7.1
- 7.4snapshot
- nightly

matrix:
allow_failures:
- php: nightly

sudo: false

cache:
directories:
- $HOME/.composer/cache/files

branches:
only:
- master
- travis

before_install:
- test "$TRAVIS_PHP_VERSION" != "nightly" || export COMPOSER_FLAGS="$COMPOSER_FLAGS --ignore-platform-reqs"

install:
- composer install
- composer install --prefer-source $COMPOSER_FLAGS
- wget https://scrutinizer-ci.com/ocular.phar -O "$HOME/ocular.phar"


before_script: |
if (php -m | grep -q -i xdebug); then
export PHPUNIT_FLAGS="--coverage-clover cache/logs/clover.xml"
else
export PHPUNIT_FLAGS="--no-coverage"
fi
script:
- vendor/bin/phpunit --coverage-clover cache/logs/clover.xml
- vendor/bin/phpunit $PHPUNIT_FLAGS

after_success:
- php "$HOME/ocular.phar" code-coverage:upload --format=php-clover cache/logs/clover.xml
after_script:
- test "$PHPUNIT_FLAGS" == "--no-coverage" || php "$HOME/ocular.phar" code-coverage:upload --format=php-clover cache/logs/clover.xml

Loading

0 comments on commit 1a2c537

Please sign in to comment.