forked from izniburak/php-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (31 loc) · 1.23 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
language: php
matrix:
include:
- php: 5.5
dist: trusty
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
sudo: required
install:
- composer install
before_script:
- sudo apt-get update
- sudo apt-get install -y apache2 libapache2-mod-fastcgi
# enable php-fpm
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]]; then sudo cp tests/fixtures/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf; fi
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "5" ]]; then sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf; fi
- 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 tests/fixtures/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
script:
- vendor/bin/phpunit