This is boilerplate/example plugin with Travis CI integration. CI scripts are based on Radiant CMS extensions testing.
You will need at least the following files from this repository:
.travis.yml
test/ci/before_script.sh
test/ci/script.sh
Gemfile
withgem "rake"
which is not specified in ChiliProject's Gemfile but Travis requires it
Modify .travis.yml
to suit your needs (see Configuration section), add additional RVMs and databases (currently MySQL and PostgreSQL are supported).
before_script.sh
clones ChiliProject to the worker, copies the plugin into vendor/plugins
and runs Bundler and migrations.
script.sh
executes plugin's tests using the test:engines:all
rake task.
Configuration is passed to the scripts using environment variables. Variables are defined in before_install
section of .travis.yml
.
MAIN_REPO="git://github.com/chiliproject/chiliproject.git"
URL of the Git repo with ChiliProject/Redmine which will use the plugin.
Defaults to the official ChiliProjectrepository.
REPO_NAME=chiliproject_test_plugin
Directory your plugin was cloned into by Travis, corresponds to the repository name.
PLUGIN_NAME=chiliproject_test_plugin
How your plugin is identified by Rails Engines, name of the plugin's directory in vendor/plugins.
Usually will be the same as REPO_NAME
TARGET_DIR="$HOME/chiliproject"
Directory the MAIN_REPO will be cloned into and from which the tests will be run.
Defines adapter and database to use.
Supported adapters: mysql
, mysql2
, postgres
Defines Gemfile groups to ignore (passed into bundle install --without
).
Based on ChiliProject's .travis.yml
# Use mysql2, ignore postgres, mysql
DB=mysql2 BUNDLE_WITHOUT=rmagick:mysql:postgres:sqlite