Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from michield/stable
add Travis-CI testing
- Loading branch information
Showing
33 changed files
with
1,438 additions
and
956 deletions.
There are no files selected for viewing
This file contains 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,4 @@ | ||
/vendor/ | ||
plugins/restapi/output/ | ||
/composer.lock | ||
/.php_cs.cache |
This file contains 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,27 @@ | ||
<?php | ||
|
||
// Needed to get styleci-bridge loaded | ||
require_once __DIR__.'/vendor/autoload.php'; | ||
|
||
use SLLH\StyleCIBridge\ConfigBridge; | ||
|
||
return ConfigBridge::create() | ||
->setUsingCache(true) | ||
; | ||
|
||
$finder = Symfony\CS\Finder\DefaultFinder::create() | ||
->exclude('admin/help') | ||
->exclude('admin/info') | ||
->exclude('public_html/texts') | ||
->exclude('admin/ui') | ||
->exclude('admin/locale') | ||
->exclude('admin/PHPMailer') | ||
->in(__DIR__) | ||
; | ||
|
||
return Symfony\CS\Config\Config::create() | ||
// ->level(Symfony\CS\FixerInterface::PSR0_LEVEL) /* default is symfony */ | ||
// ->level(Symfony\CS\FixerInterface::NONE_LEVEL) | ||
->fixers(array('trailing_spaces', 'encoding', 'align_double_arrow', 'newline_after_open_tag', 'ordered_use', 'long_array_syntax')) | ||
->finder($finder) | ||
; |
This file contains 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,23 @@ | ||
preset: symfony | ||
|
||
enabled: | ||
- align_double_arrow | ||
- newline_after_open_tag | ||
- ordered_use | ||
- long_array_syntax | ||
|
||
disabled: | ||
- unalign_double_arrow | ||
- unalign_equals | ||
|
||
finder: | ||
exclude: | ||
- "hostedplugins" | ||
- "public_html/lists/admin/plugins" | ||
- "public_html/lists/admin/PHPMailer" | ||
- "public_html/lists/admin/help" | ||
- "public_html/lists/admin/info" | ||
- "public_html/lists/admin/locale" | ||
- "public_html/lists/admin/ui" | ||
|
||
|
This file contains 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,35 @@ | ||
# Configuration file for running the test suite. Results will be at https://travis-ci.org/phpList/phplist-plugin-restapi | ||
# whitelist | ||
language: php | ||
php: | ||
- 7.0 | ||
- 5.6 | ||
- 5.5 | ||
- 5.4 | ||
- 5.3 | ||
|
||
before_script: | ||
- sudo apt-get update > /dev/null | ||
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-intl | ||
# Set a custom vhost | ||
- sudo sed -i -e "s,/var/www,$(pwd)/vendor/phpList/phplist3/public_html,g" /etc/apache2/sites-available/default | ||
- sudo sed -i -e "/DocumentRoot/i\ServerName phplist.dev" /etc/apache2/sites-available/default | ||
- sudo sed -i -e "/DocumentRoot/i\SetEnv ConfigFile $(pwd)/tests/travis-ci/config.php" /etc/apache2/sites-available/default | ||
- echo "127.0.0.1 phplist.dev" | sudo tee -a /etc/hosts | ||
- sudo cat /etc/apache2/sites-available/default | ||
- sudo /etc/init.d/apache2 restart | ||
- composer self-update | ||
- composer install --dev --prefer-dist | ||
- sudo cp -f tests/travis-ci/behat.yml behat.yml | ||
|
||
# Set MySQL configuration and create the database. | ||
- mysql -e 'SET GLOBAL wait_timeout = 5400;' | ||
- mysql -e 'create database phplisttraviscidb;' | ||
|
||
script: | ||
- vendor/bin/behat | ||
- phpunit -c tests/phpunit/phpunit.xml tests/phpunit/restapi.php | ||
after_failure: | ||
- echo "Failures detected. Outputing additional logs:" | ||
- sudo cat /var/log/apache2/error.log | ||
- sudo cat /var/log/mysql/error.log |
This file contains 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 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,26 @@ | ||
{ | ||
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/phpList/phplist3" | ||
} | ||
], | ||
"require": { | ||
"phpList/phplist3": "master" | ||
}, | ||
"require-dev": { | ||
"behat/mink": "~1.4", | ||
"behat/mink-goutte-driver": "~1.2", | ||
"behat/mink-selenium2-driver": "~1.3", | ||
"behat/behat": "~2.4", | ||
"behat/mink-extension": "~1.3", | ||
"fabpot/goutte": "1.*@stable", | ||
"sllh/php-cs-fixer-styleci-bridge": "~1.3", | ||
"phpunit/phpunit": "3.7.*" | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"config": { | ||
"bin-dir": "vendor/bin/" | ||
} | ||
} |
This file contains 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 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 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
Oops, something went wrong.