mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 06:35:45 +08:00
DEV: Avoid hardcoding PARALLEL_TEST_PROCESSORS in tests workflow (#28511)
This allows to maximize the CPU cores when the tests workflow is ran on a larger runner.
This commit is contained in:
parent
21bb28df91
commit
17db30ab7e
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
@ -73,6 +73,11 @@ jobs:
|
|||||||
if: matrix.build_type == 'system'
|
if: matrix.build_type == 'system'
|
||||||
run: apt remove -y chromium-driver chromium
|
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@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
@ -259,7 +264,7 @@ jobs:
|
|||||||
if: matrix.build_type == 'system' && matrix.target == 'core'
|
if: matrix.build_type == 'system' && matrix.target == 'core'
|
||||||
env:
|
env:
|
||||||
CHECKOUT_TIMEOUT: 10
|
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 Tests
|
- name: Plugin System Tests
|
||||||
if: matrix.build_type == 'system' && matrix.target == 'plugins'
|
if: matrix.build_type == 'system' && matrix.target == 'plugins'
|
||||||
@ -267,7 +272,7 @@ jobs:
|
|||||||
CHECKOUT_TIMEOUT: 10
|
CHECKOUT_TIMEOUT: 10
|
||||||
run: |
|
run: |
|
||||||
GLOBIGNORE="plugins/chat/*";
|
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/system
|
||||||
shell: bash
|
shell: bash
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|
||||||
@ -275,7 +280,7 @@ jobs:
|
|||||||
if: matrix.build_type == 'system' && matrix.target == 'chat'
|
if: matrix.build_type == 'system' && matrix.target == 'chat'
|
||||||
env:
|
env:
|
||||||
CHECKOUT_TIMEOUT: 10
|
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/system
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|
||||||
- name: Theme System Tests
|
- name: Theme System Tests
|
||||||
@ -283,7 +288,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CHECKOUT_TIMEOUT: 10
|
CHECKOUT_TIMEOUT: 10
|
||||||
run: |
|
run: |
|
||||||
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/system
|
||||||
shell: bash
|
shell: bash
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user