mercredi 10 août 2016

Travis CI only executing single test file phpunit

I'm having a bit of a problem with Travis CI and PHPUnit - it seems to be only executing a single test file - strangely - the tests/unit/helpers/XMLFileTest.php.

http://ift.tt/2aM0KEp

Here is a copy of the phpunit.xml.dist I'm using :

<phpunit
    convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
strict="true"
bootstrap="vendor/autoload.php"
verbose = "true"
>
<testsuites>
    <testsuite name="unit">
        <directory suffix='.php'>./tests/unit</directory>
    </testsuite>
    <testsuite name="integration">
        <directory suffix='.php'>./tests/integration</directory>    
    </testsuite>
    <testsuite name="functional">
        <directory suffix='.php'>./tests/functional</directory>
    </testsuite>
</testsuites>
<logging>
    <log type="coverage-html" target="build/coverage" title="CSV_Cruncher" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70"/>
    <log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
<filter>
    <whitelist addUncoveredFilesFromWhitelist="true">
        <directory suffix=".php">./src</directory>
    </whitelist>
</filter>
</phpunit>

And the travis.yml I'm using

language: php
php:
    - '5.6'
    - '7.0'

before_script:
    - composer install
    - find . -type f -name *.csv -exec chmod 777 {} +
    - mkdir build

script: 
    - phpunit --configuration phpunit.xml.dist --debug

after_script: 
    - php vendor/bin/coveralls -v

My folder structure for my src is :

src
    - Analysis
        - Statistics.php
    - Config
        - Validation.php
    - Exceptions
        - [various]
    - Helpers
        - DataInterface.php
        - DataFile.php
        - CSVFile.php
        - XMLFile.php
    - Segmentation 
        - Merger.php
        - Query.php
        - Split.php

Tests is the same:

tests
    - unit
        - Analysis
            - StatisticsTest.php

and so on....

Here is a link to the git repo http://ift.tt/2bfCv5m

Any reason as to why the rest of the tests aren't executing? They seem fine running both on local and through a vagrant machine with XDebug...It's hurting my brain (as you can see from the commit history)

Any questions, and help muchly appreciated!

Cheers!

Aucun commentaire:

Enregistrer un commentaire