Cirun

This gem is intended for developers of RedmineUP and allows to run tests against exactly the same images as on CI to speed up development

Installation

  1. Install docker on your development machine

docker 

Ask for credentials in support chat in Telegram

gem install cirun

Usage

Run cirun --help to see inline help

cd to folder with the plugin you're working on and

Run cirun -d <database> -r <ruby> -m <redmine> where:

database is one of pg, mysql ruby is one of 1.9.3-p551, 2.0.0-p648, 2.2.6, 2.4.1 redmine is one of 2.3, 2.4, 2.6, 3.0, 3.2, 3.3, 3.4, trunk

If name of the directory with plugin doesn't match plugin name itself, specify plugin with -p argument

Example

λ k41n-2 redmine_checklists → λ git coverage → cirun -d pg -r 2.2.6 -m 3.0

... A lot of output from docker downloading images skipped ...

Status: Downloaded newer image for redmineup/redmine_checklists:latest
+ cd /var/www/ruby-2.0.0/pg/redmine-3.0
+ '[' pg == mysql ']'
+ service postgresql start
 * Starting PostgreSQL 9.5 database server                               [ OK ]
+ sleep 5
+ echo 'RUNNING FOR redmine_checklists ruby-2.0.0 pg redmine-3.0'
RUNNING FOR redmine_checklists ruby-2.0.0 pg redmine-3.0
+ [[ '' != '' ]]
+ cd /var/www/ruby-2.0.0/pg/redmine-3.0/plugins
+ [[ '' != '' ]]
+ cd /var/www/ruby-2.0.0/pg/redmine-3.0/
+ RAILS_ENV=test
+ bundle check
The Gemfile's dependencies are satisfied
+ RAILS_ENV=test
+ bundle exec rake redmine:plugins
Migrating redmine_checklists (Redmine Checklists plugin (PRO version))...
+ RAILS_ENV=test
+ bundle exec rake test 'TEST=plugins/redmine_checklists/test/**/*_test.rb' RCOV=on
Run options: --seed 18163

# Running:

.....DEPRECATED: Use assert_nil if expecting nil from test/test_helper.rb:274. This will fail in Minitest 6.
.DEPRECATED: Use assert_nil if expecting nil from test/test_helper.rb:274. This will fail in Minitest 6.
.DEPRECATED: Use assert_nil if expecting nil from test/test_helper.rb:274. This will fail in Minitest 6.
.............................................................

Finished in 14.858262s, 4.5766 runs/s, 12.2491 assertions/s.

68 runs, 182 assertions, 0 failures, 0 errors, 0 skips