-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
30 lines (25 loc) · 1.19 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
language: php
matrix:
include:
dist: trusty
- php: 8.0
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} == "8" ]]; then sudo cp tests/fixtures/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf; fi
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "8" ]]; 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