-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
39 lines (39 loc) · 1.42 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
language: php
dist: trusty
sudo: required
php:
- '7.0'
- '7.1'
- '7.2'
services:
- mysql
before_install:
- mysql -e 'CREATE DATABASE cctestsdb;'
before_script:
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-fastcgi
# enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f .travis-apache.conf /etc/apache2/sites-available/000-default.conf
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
- sudo service apache2 restart
# - pwd
- cp -f ./tests/config-cctests.php ./config.php
# - cat ./config.php
script:
- php -v
- phpunit --version
- cd tests; php codecept.phar --version; cd ..
- cd tests
# - php codecept.phar run
- php codecept.phar run unit
- php codecept.phar run acceptance
- cd ..
# - sudo cat /var/log/apache2/error.log