From 858cc6aff2623eb795af9ce01850805299556a65 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Wed, 5 Jul 2023 09:46:48 +0800 Subject: [PATCH] DEV: Log server errors encountered when running system tests on CI (#22427) Why is this change required? We've been seeing flaky tests due to server errors on CI but are unable to debug it because we do not log any of the errors. This change gives us a fighting chance the next time we encounter a server error during system test runs. See https://github.com/discourse/discourse/actions/runs/5459248864/jobs/9935049920?pr=22424 for an example of server errors encountered during system tests. --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d9f1425d92b..90c29de8ab8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -210,11 +210,11 @@ jobs: - name: Core System Tests if: matrix.build_type == 'system' && matrix.target == 'core' - run: PARALLEL_TEST_PROCESSORS=3 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation spec/system + run: RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error PARALLEL_TEST_PROCESSORS=3 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation spec/system - name: Plugin System Tests if: matrix.build_type == 'system' && matrix.target == 'plugins' - run: LOAD_PLUGINS=1 PARALLEL_TEST_PROCESSORS=3 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/*/spec/system + run: LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error PARALLEL_TEST_PROCESSORS=3 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/*/spec/system timeout-minutes: 30 - name: Upload failed system test screenshots