mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-12-26 01:57:30 +00:00
Merge pull request #249 from joomla-extensions/php72
Add PHP7 Check Travis
This commit is contained in:
commit
d09319ad78
18
.travis.yml
18
.travis.yml
@ -4,27 +4,19 @@ php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
addons:
|
||||
firefox: "46.0.1"
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
firefox: "47.0.1"
|
||||
before_script:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -y --force-yes apache2 libapache2-mod-fastcgi php5-curl php5-mysql php5-intl php5-gd > /dev/null
|
||||
- sudo apt-get install -y --force-yes apache2 libapache2-mod-fastcgi > /dev/null
|
||||
- sudo mkdir $(pwd)/.run
|
||||
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- sudo sed -e "s,listen = 127.0.0.1:9000,listen = /tmp/php5-fpm.sock,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- sudo sed -e "s,;listen.owner = nobody,listen.owner = $USER,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- sudo sed -e "s,;listen.group = nobody,listen.group = $USER,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- sudo sed -e "s,;listen.mode = 0660,listen.mode = 0666,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- sudo sed -e "s,user = nobody,;user = $USER,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- sudo sed -e "s,group = nobody,;group = $USER,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- cat ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- chmod a+x tests/travis-php-fpm.sh
|
||||
- sudo ./tests/travis-php-fpm.sh $USER $(phpenv version-name)
|
||||
- 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
|
||||
- sudo cp -f tests/travis-ci-apache.conf /etc/apache2/sites-available/default
|
||||
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
|
||||
- sudo sed -e "s?%PHPVERSION%?${TRAVIS_PHP_VERSION:0:1}?g" --in-place /etc/apache2/sites-available/default
|
||||
- git submodule update --init --recursive
|
||||
- sudo service apache2 restart
|
||||
# Xvfb
|
||||
|
@ -16,11 +16,11 @@
|
||||
|
||||
# Wire up Apache to use Travis CI's php-fpm.
|
||||
<IfModule mod_fastcgi.c>
|
||||
AddHandler php5-fcgi .php
|
||||
Action php5-fcgi /php5-fcgi
|
||||
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
||||
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /tmp/php5-fpm.sock -pass-header Authorization
|
||||
AddHandler php%PHPVERSION%-fcgi .php
|
||||
Action php%PHPVERSION%-fcgi /php%PHPVERSION%-fcgi
|
||||
Alias /php%PHPVERSION%-fcgi /usr/lib/cgi-bin/php%PHPVERSION%-fcgi
|
||||
FastCgiExternalServer /usr/lib/cgi-bin/php%PHPVERSION%-fcgi -socket /tmp/php%PHPVERSION%-fpm.sock -pass-header Authorization
|
||||
</IfModule>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
</VirtualHost>
|
||||
</VirtualHost>
|
||||
|
19
tests/travis-php-fpm.sh
Normal file
19
tests/travis-php-fpm.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
owner="$1"
|
||||
phpversionname="$2"
|
||||
|
||||
file="/home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.conf"
|
||||
|
||||
cp /home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.conf.default /home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.conf
|
||||
if [ -f /home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.d/www.conf.default ]; then
|
||||
cp /home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.d/www.conf.default /home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.d/www.conf
|
||||
file=/home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.d/www.conf
|
||||
fi;
|
||||
|
||||
sed -e "s,listen = 127.0.0.1:9000,listen = /tmp/php${phpversionname:0:1}-fpm.sock,g" --in-place $file
|
||||
sed -e "s,;listen.owner = nobody,listen.owner = $owner,g" --in-place $file
|
||||
sed -e "s,;listen.group = nobody,listen.group = $owner,g" --in-place $file
|
||||
sed -e "s,;listen.mode = 0660,listen.mode = 0666,g" --in-place $file
|
||||
sed -e "s,user = nobody,;user = $owner,g" --in-place $file
|
||||
sed -e "s,group = nobody,;group = $owner,g" --in-place $file
|
Loading…
Reference in New Issue
Block a user