Skip to content

Commit

Permalink
Add Travis configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
lcobucci committed Mar 25, 2018
1 parent 6e936d2 commit ab176a9
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/infection.json.dist export-ignore
/phpcs.xml.dist export-ignore
/phpstan.neon.dist export-ignore
Expand Down
54 changes: 54 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
dist: trusty
sudo: false
language: php

php:
- 7.2
- nightly

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

before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer self-update

install: travis_retry composer install

script:
- ./vendor/bin/phpunit

jobs:
allow_failures:
- php: nightly

include:
- stage: Code Quality
env: TEST_COVERAGE=1
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script:
- ./vendor/bin/phpunit --coverage-clover ./clover.xml
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover ./clover.xml

- stage: Code Quality
env: CODE_STANDARD=1
script:
- ./vendor/bin/phpcs

- stage: Code Quality
env: STATIC_ANALYSIS=1
script:
- ./vendor/bin/phpstan analyse

- stage: Code Quality
env: MUTATION_TESTS=1
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for mutation tests"; exit 1; fi
script:
- ./vendor/bin/infection --threads=4 --min-msi=100 --min-covered-msi=100

0 comments on commit ab176a9

Please sign in to comment.