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.
This commit is contained in:
David Taylor 2022-08-09 12:28:52 +01:00 committed by GitHub
parent 47824bc69f
commit 14cc67c9b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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")