DEV: Drop ember-cli-based SCSS and locale compilation (#31407)

This totally separate SCSS and i18n compilation pipelines only existed
so that we could run `ember exam` in CI without starting Rails.

Now that our CI has such heavy caching of Ruby dependencies and database
migrations, the speed benefit of this is not worth the cost of
maintaining these separate pipelines.

Therefore, this commit removes that system, and updates CI to use
`bin/rake qunit:test`. That will start up a Rails server and proxy
stylesheet/locale requests to it. This strategy was already used for our
theme and plugin qunit test runs.
This commit is contained in:
David Taylor
2025-02-21 11:15:04 +00:00
committed by GitHub
parent 4461256f9e
commit 00907363d4
14 changed files with 65 additions and 492 deletions

View File

@ -4,16 +4,26 @@ class BootstrapController < ApplicationController
skip_before_action :redirect_to_login_if_required, :check_xhr
def plugin_css_for_tests
targets = Discourse.find_plugin_css_assets(include_disabled: true, desktop_view: true)
render_css_for_tests(targets)
end
def core_css_for_tests
targets = %w[color_definitions desktop admin]
render_css_for_tests(targets)
end
private
def render_css_for_tests(targets)
urls =
Discourse
.find_plugin_css_assets(include_disabled: true, desktop_view: true)
.map do |target|
details = Stylesheet::Manager.new().stylesheet_details(target, "all")
details[0][:new_href]
end
targets.map do |target|
details = Stylesheet::Manager.new().stylesheet_details(target, "all")
details[0][:new_href]
end
stylesheet = <<~CSS
/* For use in tests only - `@import`s all plugin stylesheets */
/* For use in tests only */
#{urls.map { |url| "@import \"#{url}\";" }.join("\n")}
CSS