-
-
Notifications
You must be signed in to change notification settings - Fork 47
Resolves issue #20 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,36 @@ | ||
language: php | ||
|
||
dist: trusty | ||
|
||
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: false | ||
sudo: required | ||
|
||
install: | ||
- composer install | ||
|
||
before_script: | ||
- php -S localhost:5000 tests/fixtures/server.php & | ||
- 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
RewriteEngine On | ||
RewriteBase /tests/fixtures | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule ^ index.php [QSA,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<VirtualHost *:80> | ||
DocumentRoot %TRAVIS_BUILD_DIR% | ||
|
||
<Directory "%TRAVIS_BUILD_DIR%"> | ||
Options FollowSymLinks MultiViews ExecCGI | ||
AllowOverride All | ||
Require all granted | ||
</Directory> | ||
|
||
# Wire up Apache to use Travis CI's php-fpm. | ||
<IfModule mod_fastcgi.c> | ||
AddHandler php-fcgi .php | ||
Action php-fcgi /php-fcgi | ||
Alias /php-fcgi /usr/lib/cgi-bin/php-fcgi | ||
FastCgiExternalServer /usr/lib/cgi-bin/php-fcgi -host 127.0.0.1:9000 -pass-header Authorization | ||
|
||
<Directory /usr/lib/cgi-bin> | ||
Require all granted | ||
</Directory> | ||
</IfModule> | ||
</VirtualHost> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just notice that I refer this reference to accomplish this Apache + PHP on Travis CI build :).