A platform for community discussion. Free, open, simple.
DEV: Restore qunit 'tap' reporter, but collapse verbose output in CI (#26484)
David Taylor1e42e8660183
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 7fb48f2b269..930b7b9d4a4 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -220,12 +220,12 @@ jobs:- name: Plugin QUnitif: matrix.build_type == 'frontend' && matrix.target == 'plugins'- run: QUNIT_REPORTER_FORMAT=dot QUNIT_WRITE_EXECUTION_FILE=1 QUNIT_PARALLEL=3 bin/rake plugin:qunit['*','1200000']+ run: QUNIT_WRITE_EXECUTION_FILE=1 QUNIT_PARALLEL=3 bin/rake plugin:qunit['*','1200000']timeout-minutes: 30- name: Theme QUnitif: matrix.build_type == 'frontend' && matrix.target == 'themes'- run: QUNIT_REPORTER_FORMAT=dot DISCOURSE_DEV_DB=discourse_test QUNIT_PARALLEL=3 bin/rake themes:qunit_all_official+ run: DISCOURSE_DEV_DB=discourse_test QUNIT_PARALLEL=3 bin/rake themes:qunit_all_officialtimeout-minutes: 15- uses: actions/upload-artifact@v4@@ -389,7 +389,7 @@ jobs:- name: Core QUnitworking-directory: ./app/assets/javascripts/discourse- run: yarn ember exam --path /tmp/emberbuild --load-balance --parallel=5 --reporter=dot --launch "${{ env.TESTEM_BROWSER }}" --write-execution-file --random+ run: yarn ember exam --path /tmp/emberbuild --load-balance --parallel=5 --launch "${{ env.TESTEM_BROWSER }}" --write-execution-file --randomtimeout-minutes: 15- uses: actions/upload-artifact@v4diff --git a/app/assets/javascripts/discourse/testem.js b/app/assets/javascripts/discourse/testem.jsindex 9120c468560..3776d4e9437 100644--- a/app/assets/javascripts/discourse/testem.js+++ b/app/assets/javascripts/discourse/testem.js@@ -15,6 +15,10 @@ class Reporter extends TapReporter {if (process.env.GITHUB_ACTIONS) {colors.enable();}++ if (process.env.GITHUB_ACTIONS) {+ this.out.write("::group:: Verbose QUnit test output\n");+ }}reportMetadata(tag, metadata) {@@ -105,6 +109,10 @@ class Reporter extends TapReporter {}finish() {+ if (process.env.GITHUB_ACTIONS) {+ this.out.write("::endgroup::");+ }+super.finish();this.reportDeprecations();diff --git a/lib/tasks/qunit.rake b/lib/tasks/qunit.rakeindex 855916b0cf2..c8fe5bf123b 100644--- a/lib/tasks/qunit.rake+++ b/lib/tasks/qunit.rake@@ -132,7 +132,6 @@ task "qunit:test", %i[timeout qunit_path filter] do |_, args|cmd += ["--load-balance", "--parallel", parallel] if parallelcmd += ["--filter", filter] if filtercmd << "--write-execution-file" if ENV["QUNIT_WRITE_EXECUTION_FILE"]- cmd << "--reporter=#{ENV["QUNIT_REPORTER_FORMAT"]}" if ENV["QUNIT_REPORTER_FORMAT"]end# Print out all env for debugging purposes