forked from phalcon/forum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (78 loc) · 2.54 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
language: php
sudo: required
dist: trusty
php:
- 5.6
matrix:
include:
- php: 7.0
env: ZEND_BACKEND="--backend=ZendEngine3"
services:
- memcached
git:
depth: 1
cache:
apt: true
ccache: true
timeout: 691200
directories:
- .temp
- vendor
- $HOME/.ccache
- $HOME/.composer/cache
env:
global:
- ZEND_DONT_UNLOAD_MODULES=1
- CC="ccache gcc"
- PATH="$PATH:~/bin"
- PHALCON_VERSION="v3.0.3"
before_install:
- phpenv config-rm xdebug.ini || true
- sudo ln -s /home/travis/.phpenv/versions/$(phpenv version-name)/bin/phpize /usr/bin/
- sudo ln -s /home/travis/.phpenv/versions/$(phpenv version-name)/bin/php-config /usr/bin/
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
- travis_retry composer install --prefer-dist --no-interaction --ignore-platform-reqs
- travis_retry composer require --dev "phalcon/zephir:dev-master" --ignore-platform-reqs
- ( bash tests/_ci/install_zephir.sh )
- ( bash tests/_ci/install_prereqs.sh )
install:
- git clone -q --depth=1 https://github.com/phalcon/cphalcon.git -b ${PHALCON_VERSION}
- ln -s ${TRAVIS_BUILD_DIR}/.temp ${TRAVIS_BUILD_DIR}/cphalcon/.temp
- ( cd cphalcon; zephir fullclean && zephir generate $ZEND_BACKEND )
- ( cd cphalcon/ext; export CFLAGS="-g3 -O1 -std=gnu90 -Wall -DZEPHIR_RELEASE=1"; /usr/bin/phpize &> /dev/null && ./configure --silent --enable-phalcon &> /dev/null && make --silent -j3 &> /dev/null && make --silent install )
- phpenv config-add cphalcon/tests/_ci/phalcon.ini
before_script:
# Create database and user
- echo 'CREATE DATABASE phosphorum CHARSET=utf8 COLLATE=utf8_unicode_ci' | mysql -u root
- echo "CREATE USER 'phosphorum'@'%' IDENTIFIED BY 'secret'" | mysql -u root
- echo "GRANT ALL PRIVILEGES ON phosphorum.* TO 'phosphorum'@'%' WITH GRANT OPTION" | mysql -u root
- cat schemas/forum.sql | mysql -u root phosphorum
- cp ./tests/.env.travis .env
- php -S 127.0.0.1:8000 -t public/ .htrouter.php >/dev/null 2>&1 &
- sudo ulimit -c unlimited -S || true
script:
- vendor/bin/phpcs
- vendor/bin/codecept build
# Run tests
- vendor/bin/codecept run unit
- vendor/bin/codecept run functional
- vendor/bin/codecept run acceptance
- vendor/bin/codecept run console
notifications:
email:
recipients:
on_success: change
on_failure: always
addons:
apt:
packages:
- gdb
- re2c
- beanstalkd
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
hosts:
- db
- pforum.loc