forked from smi2/phpClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (76 loc) · 2.66 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
dist: trusty
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
php:
- 7.1
- 7.2
- nightly
services:
- docker
before_install:
- docker pull yandex/clickhouse-server
- docker run -d -p 8123:8123 --name clickhouse --ulimit nofile=262144:262144 yandex/clickhouse-server
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
install:
- travis_retry composer update -n --prefer-dist
script: ./vendor/bin/phpunit
jobs:
allow_failures:
- php: nightly
- env: DEV_DEPENDENCIES
include:
- stage: Test
env: LOWEST_DEPENDENCIES
install:
- travis_retry composer update -n --prefer-dist --prefer-lowest
- stage: Test
env: LOWEST_DEPENDENCIES
php: 7.2
install:
- travis_retry composer update -n --prefer-dist --prefer-lowest
- stage: Test
env: LOWEST_DEPENDENCIES
php: nightly
install:
- travis_retry composer update -n --prefer-dist --prefer-lowest
- stage: Test
env: DEV_DEPENDENCIES
php: nightly
install:
- composer config minimum-stability dev
- travis_retry composer update -n --prefer-dist
- stage: Test
env: COVERAGE
php: 7.1
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script:
- ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
after_script:
- wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- stage: Pull request coding standard
if: type = pull_request
php: 7.1
install: travis_retry composer install --prefer-dist
script:
- |
if [ $TRAVIS_BRANCH != "master" ]; then
git remote set-branches --add origin $TRAVIS_BRANCH;
git fetch origin $TRAVIS_BRANCH;
fi
- git merge-base origin/$TRAVIS_BRANCH $TRAVIS_PULL_REQUEST_SHA || git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge --unshallow
- wget https://github.com/diff-sniffer/git/releases/download/0.1.0/git-phpcs.phar
- php git-phpcs.phar origin/$TRAVIS_BRANCH...$TRAVIS_PULL_REQUEST_SHA
# - stage: Coding standard
# if: NOT type = pull_request
# php: 7.1
# install: travis_retry composer install --prefer-dist
# script:
# - ./vendor/bin/phpcs
- stage: Static Analysis
script: vendor/bin/phpstan analyse -c phpstan.neon src tests