-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add rake tasks to run every module only
ci skip
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 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,33 @@ | ||
# frozen_string_literal: true | ||
|
||
namespace :test do | ||
modules = %w{ | ||
gobierto_admin | ||
gobierto_attachments | ||
gobierto_budgets | ||
gobierto_calendars | ||
gobierto_cms gobierto_common | ||
gobierto_core | ||
gobierto_dashboards | ||
gobierto_data | ||
gobierto_exports | ||
gobierto_indicators | ||
gobierto_investments | ||
gobierto_observatory | ||
gobierto_people | ||
gobierto_plans | ||
gobierto_visualizations | ||
gobierto_others | ||
gobierto_engines | ||
} | ||
|
||
modules.each do |mod| | ||
desc "run test for module #{mod}.safe_constantize " | ||
task "#{mod}".to_sym, [:fail_fast_enable] => :environment do |_t, args| | ||
files = `find test -path '*#{mod}*' -name '*_test.rb' | grep -v '#{mod}\/gobierto_'`.gsub("\n"," ") | ||
cmd = "bin/rails test #{files} #{"--fail-fast" if args[:fail_fast_enable]}" | ||
puts cmd | ||
puts `#{cmd}` | ||
end | ||
end | ||
end |