Skip to content

Commit

Permalink
Fix tests to mimic libphonenumber-for-php
Browse files Browse the repository at this point in the history
  • Loading branch information
giggsey committed Oct 9, 2019
1 parent 8d3dc01 commit 95a2b03
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
51 changes: 29 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
sudo: false

dist: trusty

language: php

matrix:
fast_finish: true
include:
# Need to use Trusty for PHP 5.3
- php: 5.3
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
dist: precise
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3

before_script:
- travis_retry composer update --no-interaction $COMPOSER_FLAGS
- mkdir -p build/logs
# Need to use Precise for PHP 5.3
- php: 5.3
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE_FLAGS=""
dist: precise
- php: 5.4
- php: 5.5
- php: 5.6
env: COVERAGE_FLAGS=" --coverage-text --coverage-clover build/logs/clover.xml"
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
env: COVERAGE_FLAGS=" --coverage-text --coverage-clover build/logs/clover.xml"
- php: 7.4snapshot

before_install:
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
- mkdir -p build/logs

install:
- travis_retry composer update --no-interaction $COMPOSER_FLAGS

script:
- ./vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
- composer validate --strict
- ./vendor/bin/phpunit $COVERAGE_FLAGS

after_script:
- php vendor/bin/coveralls -v --exclude-no-stmt
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
after_success:
- "[[ -f vendor/bin/php-coveralls ]] && COVERALLS_PATH=vendor/bin/php-coveralls || COVERALLS_PATH=vendor/bin/coveralls"
- travis_retry php $COVERALLS_PATH -v --exclude-no-stmt
- travis_retry php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

notifications:
irc: "irc.appliedirc.com#applied"
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.0",
"satooshi/php-coveralls": "^1.0",
"php-coveralls/php-coveralls": "^1.0|^2.0",
"phing/phing": "~2.7",
"pear/versioncontrol_git": "^0.5",
"pear/pear-core-minimal": "^1.9",
Expand Down

0 comments on commit 95a2b03

Please sign in to comment.