Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2013-12-17 03:24:11 +0400
committerThomas Steur <thomas.steur@gmail.com>2013-12-17 03:24:11 +0400
commit71aac2f2ebef7836a9941070fcd0c0645459da44 (patch)
treee6314e2f413fcd50a72085c9b5761c7af4025482
parentfd80fa4b523d3fe84590658ae4839b6158b7cd23 (diff)
refs #4280 created a travis.yml that allows plugin developers to run their tests on travis
-rw-r--r--plugins/CoreConsole/Commands/GeneratePlugin.php1
-rw-r--r--plugins/ExamplePlugin/.travis.yml38
2 files changed, 39 insertions, 0 deletions
diff --git a/plugins/CoreConsole/Commands/GeneratePlugin.php b/plugins/CoreConsole/Commands/GeneratePlugin.php
index 2dcfe172f4..b68210e182 100644
--- a/plugins/CoreConsole/Commands/GeneratePlugin.php
+++ b/plugins/CoreConsole/Commands/GeneratePlugin.php
@@ -65,6 +65,7 @@ class GeneratePlugin extends GeneratePluginBase
'/ExamplePlugin.php',
'/plugin.json',
'/README.md',
+ '/.travis.yml',
'/screenshots',
'/screenshots/.gitkeep',
'/javascripts',
diff --git a/plugins/ExamplePlugin/.travis.yml b/plugins/ExamplePlugin/.travis.yml
new file mode 100644
index 0000000000..cf54a4bb44
--- /dev/null
+++ b/plugins/ExamplePlugin/.travis.yml
@@ -0,0 +1,38 @@
+language: php
+
+php:
+- 5.3
+
+env:
+ matrix:
+ - TEST_SUITE=CoreTests MYSQL_ADAPTER=PDO_MYSQL
+ - TEST_SUITE=PluginTests MYSQL_ADAPTER=PDO_MYSQL
+
+script: ./travis.sh
+
+install:
+ - TEST_PIWIK_VERSION=$(wget builds.piwik.org/LATEST -q -O -)
+ - TEST_PIWIK_VERSION=`echo $TEST_PIWIK_VERSION | tr -d ' ' | tr -d '\n'`
+ - mkdir ExamplePlugin
+ - cp -R !(ExamplePlugin) ExamplePlugin
+ - git clone https://github.com/piwik/piwik.git piwik
+ - cd piwik
+ - git checkout "$TEST_PIWIK_VERSION"
+ - composer install
+ - rm -rf plugins/ExamplePlugin
+ - cd ../
+ - mv ExamplePlugin piwik/plugins
+
+before_script:
+ - cd piwik
+ - uname -a
+ - date
+ - mysql -e 'create database piwik_tests;'
+ - ./tests/travis/prepare.sh
+ - ./tests/travis/setup_webserver.sh
+ - wget https://raw.github.com/piwik/piwik-tests-plugins/master/activateplugin.php
+ - php activateplugin.php ExamplePlugin
+ - cd tests/PHPUnit
+
+after_script:
+ - cat /var/log/nginx/error.log \ No newline at end of file