forked from phalcon/cphalcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
124 lines (102 loc) · 2.67 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
language: php
php:
- '7.4snapshot'
- '7.3'
- '7.2'
dist: bionic
git:
depth: 5
quiet: true
addons:
apt:
packages:
- gdb
- shellcheck
- libsodium-dev
postgresql: "9.4"
matrix:
fast_finish: true
allow_failures:
- php: '7.4snapshot'
cache:
timeout: 604800
directories:
- ${HOME}/.composer/cache
services:
- mysql
- mongodb
- redis-server
- postgresql
- memcached
env:
global:
- CC="gcc"
- ZEPHIR_VERSION="0.12.4"
- ZEPHIR_PARSER_VERSION="v1.3.1"
- REPORT_COVERAGE=1
- PATH="${HOME}/.composer/vendor/bin:${PATH}"
- TRAVIS_COMMIT_LOG="$(git log --format=fuller -5)"
before_install:
- |
# Core dump settings
ulimit -c unlimited -S || true
echo '/tmp/core.%e.%p.%t' | sudo tee /proc/sys/kernel/core_pattern
if [ -n "$GITHUB_TOKEN" ]; then
composer config github-oauth.github.com "$GITHUB_TOKEN"
echo 'Add Github token'
fi
[ -d ~/bin ] || mkdir ~/bin
export PHP_PEAR_PHP_BIN="$(phpenv which php)"
DEFAULT_COMPOSER_FLAGS=("--no-interaction" "--no-ansi" "--no-progress" "--no-suggest")
if [ "$(php-config --vernum)" -ge "70400" ]
then
DEFAULT_COMPOSER_FLAGS+=("--ignore-platform-reqs")
fi
export DEFAULT_COMPOSER_FLAGS
# Hide "You are in 'detached HEAD' state" message
git config --global advice.detachedHead false
- source .ci/export-variables.sh
install:
- .ci/setup-dbs.sh
- .ci/install-zephir.sh
- .ci/install-php-extensions.sh
- travis_retry composer install ${DEFAULT_COMPOSER_FLAGS[*]}
before_script:
- |
# Setting up Travis' PHP
cat .ci/travis.ini >> "$(phpenv prefix)/etc/conf.d/travis.ini"
if [ "$(php-config --vernum)" -ge "70400" ]
then
export REPORT_COVERAGE=0
fi
- .ci/build.sh
script:
- vendor/bin/codecept build --quiet
- vendor/bin/codecept run --ext DotReporter tests/cli/
- vendor/bin/codecept run --ext DotReporter tests/integration/
- vendor/bin/codecept run --ext DotReporter tests/unit/
- .ci/run-volt-tests.sh
jobs:
include:
- stage: Static Code Analysis
php: '7.2'
env:
- REPORT_COVERAGE=0
install:
- travis_retry composer install ${DEFAULT_COMPOSER_FLAGS[*]} --ignore-platform-reqs
before_script:
- phpenv config-rm xdebug.ini || true
script:
- vendor/bin/phpcs
- shellcheck .ci/*.sh
after_failure:
- echo "$($(phpenv which php) -v)"
- echo "$($(phpenv which php) -m)"
- .ci/after-failure.sh
after_success:
- '[[ "$REPORT_COVERAGE" -eq 1 ]] && bash <(curl -s https://codecov.io/bash)'
after_script:
- printf "$TRAVIS_COMMIT_RANGE\n"
- printf "$TRAVIS_COMMIT_LOG\n"
notifications:
email: false