forked from facile-it/mongodb-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
77 lines (63 loc) · 2.58 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
dist: trusty
language: minimal
services:
- docker
cache:
directories:
- vendor
git:
depth: 1
env:
matrix:
- PHP_IMG="base-7.1-mongoext-1.1.5" MONGO_IMG="mongo:3.0" SYMFONY="3.4.*"
- PHP_IMG="base-7.2-mongoext-1.3.0" MONGO_IMG="mongo:3.4" SYMFONY="3.4.*"
- PHP_IMG="base-7.2-mongoext-1.3.0" MONGO_IMG="mongo:3.4" SYMFONY="4.*"
- PHP_IMG="base-7.2-mongoext-1.5.3" MONGO_IMG="percona/percona-server-mongodb:4.0"
- PHP_IMG="base-7.3-mongoext-1.5.3" MONGO_IMG="mongo:4.0"
- PHP_IMG="base-7.3-mongoext-1.5.3" MONGO_IMG="percona/percona-server-mongodb:4.0"
before_install:
- rm docker-compose.yml
- mv docker-compose.travis.yml docker-compose.yml
- sudo chmod -R 777 . # ugly! Travis is 2000:2000
install:
- |
if [ "$SYMFONY" != "" ]; then
docker-compose run --no-deps --rm php-cli composer require "symfony/symfony:${SYMFONY}" --no-update;
fi;
- docker-compose run --no-deps --rm php-cli composer install --prefer-dist --no-interaction ${COMPOSER_FLAGS}
before_script:
- docker-compose run --no-deps --rm php-cli composer validate
script:
- docker-compose run --rm php-cli bash -c "sleep 3; bin/phpunit -c phpunit.xml.dist"
jobs:
allow_failures:
- env: PHP_IMG="base-7.2-mongoext-1.3.0" MONGO_IMG="mongo:3.4" SYMFONY="dev-master"
- name: "phpstan"
- name: "cs-check"
include:
- stage: "Test"
env: PHP_IMG="base-7.2-mongoext-1.3.0" MONGO_IMG="mongo:3.4" SYMFONY="dev-master"
install:
- docker-compose run --no-deps --rm php-cli composer config minimum-stability dev
- docker-compose run --no-deps --rm php-cli composer install --prefer-dist --no-interaction ${COMPOSER_FLAGS}
- stage: "Analysis"
name: "coverage"
env: PHP_IMG="base-7.1-mongoext-1.1.5" MONGO_IMG="mongo:3.0" SYMFONY="3.4.*"
script:
- docker-compose run --rm php-cli bash -c "sleep 3; bin/phpunit -c phpunit.xml.dist --coverage-clover=./build/coverage/coverage.clover"
after_success:
- wget https://scrutinizer-ci.com/ocular.phar --output-document="${HOME}/bin/ocular"
- chmod +x "${HOME}/bin/ocular"
- ocular code-coverage:upload --format=php-clover ./build/coverage/coverage.clover
- stage: "Analysis"
name: "phpstan"
script:
- docker-compose run --no-deps --rm php-cli bin/phpstan analyze -l7 src/ tests/
- stage: "Analysis"
name: "cs-check"
script:
- docker-compose run --no-deps --rm php-cli composer cs-check src/
- docker-compose run --no-deps --rm php-cli composer cs-check tests/
notifications:
on_success: change
on_failure: change