forked from zarplata/mongodb-migrations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (31 loc) · 1.1 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
matrix:
include:
# Test the latest dependencies
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
# Test with the lowest dependencies
- php: 7.4
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest --prefer-dist"
before_script:
# Remove xdebug at the start
- phpenv config-rm xdebug.ini
- pecl install -f mongodb-stable
# Until doctrine/mongo switches to mongodb driver
- composer self-update
# To be removed when this issue is resolved: https://github.com/composer/composer/issues/5355
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
- composer update -v ${COMPOSER_FLAGS}
# Restore xdebug for code coverage
- echo "zend_extension=xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
script:
- ./vendor/bin/phpunit --coverage-clover=coverage.clover
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover