forked from pear/HTTP_Request2
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
32 lines (32 loc) · 1.29 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
language: php
php:
- 7.3
- 7.4
install: pear install Net_URL2
addons:
hosts:
- hr2.local
- www.hr2.local
before_script:
# directory for apache logs
- mkdir -p $TRAVIS_BUILD_DIR/logs
# As described @ http://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-php
#- 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 a2enmod rewrite actions fastcgi alias
#- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
#- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
- sudo cp -f tests/travis-ci-apache /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
# use travis config for network-backed tests
- cp tests/NetworkConfig.php.travis tests/NetworkConfig.php
script: composer test
after_failure:
- cat $TRAVIS_BUILD_DIR/logs/hr2-error.log
- cat $TRAVIS_BUILD_DIR/logs/hr2-access.log