Skip to content

Commit

Permalink
Setup TravisCI
Browse files Browse the repository at this point in the history
  • Loading branch information
alariva committed Sep 10, 2018
1 parent 55bc0ec commit c5ad695
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: php

php:
- '7.1'
- '7.2'
- nightly

env:
matrix:
- PREFER_LOWEST="--prefer-lowest --prefer-stable"
- PREFER_LOWEST=""

before_install:
- composer install --dev

before_script:
- composer update $PREFER_LOWEST
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build

script:
- ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml --configuration phpunit-travis.xml

after_script:
- mv build/logs/clover.xml clover.xml
- ./cc-test-reporter after-build --coverage-input-type clover --id $CODECLIMATE_REPO_TOKEN --exit-code $TRAVIS_TEST_RESULT
22 changes: 22 additions & 0 deletions phpunit-travis.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Package">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>src/</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit c5ad695

Please sign in to comment.