diff options
Diffstat (limited to 'lib/tasks/ci.rake')
| -rw-r--r-- | lib/tasks/ci.rake | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index e31017b5a..7ef867b71 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -14,8 +14,14 @@ namespace :ci do desc "Prepare CI build" task :setup do - # FIXME remove this specific behavior + unless ENV["IGNORE_YARN_INSTALL"] + # FIXME remove this specific behavior + # Managed by Dockerfile.build + sh "yarn --frozen-lockfile install" + end + unless ENV["KEEP_DATABASE_CONFIG"] + # FIXME remove this specific behavior cp "config/database.yml", "config/database.yml.orig" cp "config/database/ci.yml", "config/database.yml" end @@ -28,6 +34,15 @@ namespace :ci do end end + task :fix_webpacker do + # Redefine webpacker:yarn_install to avoid --production + # in CI process + Rake::Task["webpacker:yarn_install"].clear + Rake::Task.define_task "webpacker:yarn_install" do + puts "Don't run yarn" + end + end + def git_branch if ENV['GIT_BRANCH'] =~ %r{/(.*)$} $1 @@ -55,7 +70,7 @@ namespace :ci do end task :assets do - sh "RAILS_ENV=test bundle exec rake assets:precompile i18n:js:export" + sh "RAILS_ENV=test bundle exec rake ci:fix_webpacker assets:precompile i18n:js:export" end task :jest do |
