Skip to content

Commit

Permalink
Merge a77ff56 into 65238a4
Browse files Browse the repository at this point in the history
  • Loading branch information
k00ni committed Jul 9, 2020
2 parents 65238a4 + a77ff56 commit f56bfeb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 18 deletions.
39 changes: 25 additions & 14 deletions .travis.yml
@@ -1,12 +1,16 @@
sudo: required
dist: xenial

os: linux

language: php

services:
- docker

matrix:
jobs:
fast_finish: true
allow_failures:
- php: nightly
include:
#
# Define versions of MySQL and MariaDB to test against.
Expand Down Expand Up @@ -139,6 +143,20 @@ matrix:
env: DB=mariadb:10.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
- php: 7.4
env: DB=mariadb:10.5 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql CACHE_ENABLED=true
#
# COVERAGE
#
- php: 7.4
env: COVERAGE_RUN=run DB=mysql:5.7 DB_ADAPTER=mysqli
- php: 7.4
env: COVERAGE_RUN=run DB=mysql:5.7 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
#
# PHP nightly (8.x) with mysqli and PDO for MySQL only
#
- php: nightly
env: DB=mysql:5.7 DB_ADAPTER=mysqli
- php: nightly
env: DB=mysql:5.7 DB_ADAPTER=pdo DB_PDO_PROTOCOL=mysql
git:
depth: 1

Expand All @@ -151,20 +169,13 @@ before_script:
# install and init database (see matrix => include => env)
#
- ./.travis/install-and-init-db.sh

#
# setup and run tests
#
# Install composer packages, will also trigger dump-autoload
- travis_retry composer install --no-interaction --prefer-dist
# Install coveralls.phar
- travis_retry wget -c -nc --retry-connrefused --tries=0 https://github.com/satooshi/php-coveralls/releases/download/v1.1.0/coveralls.phar
- chmod +x coveralls.phar
- php coveralls.phar --version
# composer
- travis_retry composer update --no-interaction --prefer-dist

script:
- vendor/bin/phpunit --coverage-clover gen/coverage/clover.xml
- if [ "$COVERAGE_RUN" = "run" ]; then composer phpunit-with-coverage ; fi;
- if [ "$COVERAGE_RUN" != "run" ]; then composer phpunit ; fi;

after_success:
# Submit coverage report to Coveralls servers, see .coveralls.yml
- travis_retry php coveralls.phar -v
- if [ "$COVERAGE_RUN" = "run" ]; then travis_retry php vendor/bin/php-coveralls -v ; fi;
7 changes: 6 additions & 1 deletion composer.json
Expand Up @@ -33,7 +33,8 @@
"require-dev": {
"doctrine/instantiator": "^1.3",
"friendsofphp/php-cs-fixer": "^2.16.1",
"phpunit/phpunit": "^8.0"
"phpunit/phpunit": "^8.0",
"php-coveralls/php-coveralls": "^2.2"
},
"autoload": {
"classmap": ["parsers/", "serializers/", "store/"],
Expand All @@ -58,5 +59,9 @@
"tests"
]
}
},
"scripts": {
"phpunit": "vendor/bin/phpunit",
"phpunit-with-coverage": "vendor/bin/phpunit --coverage-clover gen/coverage/clover.xml"
}
}
3 changes: 0 additions & 3 deletions phpunit.xml
Expand Up @@ -25,9 +25,6 @@
<directory suffix="Test.php">./tests/unit</directory>
</testsuite>
</testsuites>
<logging>
<log type="coverage-html" target="tests/coverage" lowUpperBound="35" highLowerBound="70" />
</logging>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./extractors</directory>
Expand Down

0 comments on commit f56bfeb

Please sign in to comment.