Skip to content

Commit

Permalink
Provide some code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot committed Apr 23, 2017
1 parent 6f1b00f commit 29f6565
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.env
composer.phar
composer.lock
build
vendor
.idea
.php_cs.cache
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ install:
- travis_retry composer install --prefer-dist --no-interaction --no-suggest

script:
- vendor/bin/phpunit
- composer run test:ci

after_success:
- bash <(curl -s https://codecov.io/bash)
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
"Nuwave\\Lighthouse\\Tests\\": "tests/"
}
},
"scripts": {
"test" : "vendor/bin/phpunit --colors=always",
"test:ci": "composer test -- --verbose --coverage-text --coverage-clover=coverage.xml"
},
"config": {
"sort-packages": true
}
Expand Down
16 changes: 16 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
<exclude>
<file>src/LaravelServiceProvider.php</file>
<file>src/Support/helpers.php</file>
</exclude>
</whitelist>
</filter>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
<php>
<!-- Strong Password Generator (https://strongpasswordgenerator.com/) -->
<env name="APP_KEY" value="O4JYm19Y7qXbllmw5zng88a4MlUmW0uq" />
Expand Down

0 comments on commit 29f6565

Please sign in to comment.