-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
56 lines (48 loc) · 1.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
sudo: required
dist: trusty
language: php
branches:
only:
- master
- main
- development
except:
- development-2
php:
- 7.1
- 7.2
- 7.3
services:
- mysql
- redis
- memcached
- mongodb
addons:
mariadb: '10.0'
before_script:
- composer self-update
- composer install --no-interaction --prefer-source --dev
# Create DB for testing.
- mysql -u root -e 'CREATE DATABASE shieldon_unittest;'
- mysql -u root -e "CREATE USER 'shieldon'@'localhost' IDENTIFIED BY 'taiwan';"
- mysql -u root -e "GRANT ALL ON shieldon_unittest.* TO 'shieldon'@'localhost';"
# Install PHP PECL extensions.
- pecl channel-update pecl.php.net
- echo yes | pecl install -f apcu
- echo yes | pecl install -f apcu_bc
- echo yes | pecl install -f memcache
- echo yes | pecl install -f mongodb-1.7.5
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# Print php.ini for debugging purpose.
- cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# Change the apc.so position to fix issues.
- sudo sed -i '/apc.so/d' ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo sed -i '/apcu.so/d' ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = apcu.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# Enable APC in CLI environment.
- echo "apc.enable_cli = On" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
script: composer test
after_success:
- bash <(curl -s https://codecov.io/bash)