From 14cc67c9b2445b9f53a48852e2d5c954efba6052 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 9 Aug 2022 12:28:52 +0100 Subject: [PATCH] DEV: Run `yarn install` for all `rake docker:test` invocations (#17844) Previously we were only `yarn install`ing for linting and qunit runs. The Rails app now relies on a number of `node_modules` dependencies (e.g. for pretty_text, and discourse_js_processor), so we need to make sure they're available. --- lib/tasks/docker.rake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake index ea06541114f..fc942c4ad6e 100644 --- a/lib/tasks/docker.rake +++ b/lib/tasks/docker.rake @@ -59,9 +59,9 @@ desc 'Run all tests (JS and code in a standalone environment)' task 'docker:test' do begin @good = true + @good &&= run_or_fail("yarn install") unless ENV['SKIP_LINT'] - @good &&= run_or_fail("yarn install") puts "Running linters/prettyfiers" puts "eslint #{`yarn eslint -v`}" puts "prettier #{`yarn prettier -v`}" @@ -206,7 +206,6 @@ task 'docker:test' do unless ENV["RUBY_ONLY"] js_timeout = ENV["JS_TIMEOUT"].presence || 900_000 # 15 minutes - @good &&= run_or_fail 'yarn install' unless ENV["SKIP_CORE"] @good &&= run_or_fail("cd app/assets/javascripts/discourse && CI=1 yarn ember exam --random")