Skip to content

Commit

Permalink
add default rake task, run prettier via rake
Browse files Browse the repository at this point in the history
  • Loading branch information
eessex committed Jun 4, 2020
1 parent 33dedcd commit 6eeed32
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ namespace :cron do
ComparisonService.refresh_all_comparisons
end
end

if Rails.env.development? || Rails.env.test?
desc 'run prettier'
task prettier: :environment do
system 'yarn prettier'
abort 'prettier failed' unless $CHILD_STATUS.exitstatus.zero?
end

Rake::Task[:default].clear
task default: %i[prettier spec]
end
2 changes: 1 addition & 1 deletion hokusai/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -ex

sleep 1 # wait for postgres :(
bundle exec rails db:prepare
bundle exec rake spec
bundle exec rake

0 comments on commit 6eeed32

Please sign in to comment.