Skip to content

Commit

Permalink
Reworked Travis build matrix
Browse files Browse the repository at this point in the history
Travis now supports merged code coverage reports, so we do not need to merge them ourselves.
  • Loading branch information
BenMorel committed May 22, 2015
1 parent 9ab6358 commit 49ea5a0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 40 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ php:
- 7
- hhvm

env:
- CALCULATOR=GMP
- CALCULATOR=BCMath
- CALCULATOR=Native

before_script:
- composer self-update
- composer install
- mkdir -p build/cov build/logs

script:
- ./run-all-tests.sh build/cov
- mkdir -p build/cov build/logs
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml

after_script:
- vendor/bin/phpcov merge --clover build/logs/clover.xml build/cov
- vendor/bin/coveralls -v
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
},
"require-dev": {
"phpunit/phpunit": "*",
"satooshi/php-coveralls": "dev-master",
"phpunit/phpcov": "*"
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-4": {
Expand Down
13 changes: 0 additions & 13 deletions phpunit-detect.xml

This file was deleted.

File renamed without changes.
5 changes: 2 additions & 3 deletions phpunit-main.xml → phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true" bootstrap="phpunit-main.php">
<phpunit colors="true" bootstrap="phpunit.php">
<testsuites>
<testsuite>
<directory>tests</directory>
<exclude>tests/CalculatorDetectTest.php</exclude>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory>src</directory>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
19 changes: 0 additions & 19 deletions run-all-tests.sh

This file was deleted.

4 changes: 4 additions & 0 deletions tests/CalculatorDetectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ class CalculatorDetectTest extends \PHPUnit_Framework_TestCase
{
public function testGetWithNoCalculatorSetDetectsCalculator()
{
$currentCalculator = Calculator::get();

Calculator::set(null);
$this->assertInstanceOf(Calculator::class, Calculator::get());

Calculator::set($currentCalculator);
}
}

0 comments on commit 49ea5a0

Please sign in to comment.