A platform for community discussion. Free, open, simple.
DEV: Avoid hardcoding PARALLEL_TEST_PROCESSORS in tests workflow (#28511)
Alan Guo Xiang Tan17db30ab7eca
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 1ca1dd1cd88..873c70bb9c6 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -73,6 +73,11 @@ jobs:if: matrix.build_type == 'system'run: apt remove -y chromium-driver chromium+ - name: Halve PARALLEL_TEST_PROCESSORS+ if: matrix.build_type == 'system'+ run: |+ echo "PARALLEL_TEST_PROCESSORS=$(($(nproc) / 2))" >> $GITHUB_ENV+- uses: actions/checkout@v4with:fetch-depth: 1@@ -259,7 +264,7 @@ jobs:if: matrix.build_type == 'system' && matrix.target == 'core'env:CHECKOUT_TIMEOUT: 10- run: RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error PARALLEL_TEST_PROCESSORS=4 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation spec/system+ run: RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation spec/system- name: Plugin System Testsif: matrix.build_type == 'system' && matrix.target == 'plugins'@@ -267,7 +272,7 @@ jobs:CHECKOUT_TIMEOUT: 10run: |GLOBIGNORE="plugins/chat/*";- LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error PARALLEL_TEST_PROCESSORS=4 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/*/spec/system+ LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/*/spec/systemshell: bashtimeout-minutes: 30@@ -275,7 +280,7 @@ jobs:if: matrix.build_type == 'system' && matrix.target == 'chat'env:CHECKOUT_TIMEOUT: 10- run: LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error PARALLEL_TEST_PROCESSORS=4 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/chat/spec/system+ run: LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/chat/spec/systemtimeout-minutes: 30- name: Theme System Tests@@ -283,7 +288,7 @@ jobs:env:CHECKOUT_TIMEOUT: 10run: |- RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error PARALLEL_TEST_PROCESSORS=4 bin/turbo_rspec --profile=50 --verbose --format documentation tmp/themes/*/spec/system+ RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error bin/turbo_rspec --profile=50 --verbose --format documentation tmp/themes/*/spec/systemshell: bashtimeout-minutes: 30