forked from doctrine/mongodb-odm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
62 lines (53 loc) · 2.07 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
dist: xenial
sudo: required
language: php
php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4snapshot
env:
global:
- DEPLOYMENT=SHARDED_CLUSTER_RS
- KEY_SERVER="hkp://keyserver.ubuntu.com:80"
- MONGO_REPO_URI="https://repo.mongodb.org/apt/ubuntu"
- MONGO_REPO_TYPE="xenial/mongodb-org/"
- SOURCES_LOC="/etc/apt/sources.list.d/mongodb.list"
- DRIVER_VERSION="stable"
- ADAPTER_VERSION="^1.0.0"
- SERVER_VERSION="4.2"
- KEY_ID="E162F504A20CDF15827F718D4B7C549A058F8B6B"
jobs:
include:
# Test against lowest dependencies, including driver and server versions
- stage: Test
php: 5.6
env: DRIVER_VERSION="1.6.7" COMPOSER_FLAGS="--prefer-lowest" SERVER_VERSION="3.6" KEY_ID="2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5"
# Test against MongoDB 4.0
- stage: Test
php: 7.3
env: SERVER_VERSION="4.0" KEY_ID="9DA31620334BD75D9DCB49F368818C72E52529D4"
before_install:
- sudo apt-key adv --keyserver ${KEY_SERVER} --recv ${KEY_ID}
- echo "deb ${MONGO_REPO_URI} ${MONGO_REPO_TYPE}${SERVER_VERSION} multiverse" | sudo tee ${SOURCES_LOC}
- sudo apt-get update -qq
install:
- sudo apt-get --allow-unauthenticated install mongodb-org
- if nc -z localhost 27017; then sudo service mongod stop; fi
- sudo pip install mongo-orchestration
- sudo mongo-orchestration start
before_script:
- .travis/setup_mo.sh
- composer self-update
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then yes '' | pecl -q install -f mongo-${DRIVER_VERSION}; fi
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then pecl install -f mongodb-${DRIVER_VERSION}; fi
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then composer config "platform.ext-mongo" "1.6.16" && composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}"; fi
- composer update ${COMPOSER_FLAGS}
script:
- export DOCTRINE_MONGODB_SERVER=`cat /tmp/uri.txt`
- echo $DOCTRINE_MONGODB_SERVER
- ./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