DEV: Don't hardcode number of parallel processes for QUnit (#28535)

This commit is contained in:
Alan Guo Xiang Tan 2024-08-26 08:42:35 +08:00 committed by GitHub
parent e58e7a49f5
commit b586f2cb98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,11 +73,16 @@ 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 - name: Set PARALLEL_TEST_PROCESSORS for system tests
if: matrix.build_type == 'system' if: matrix.build_type == 'system'
run: | run: |
echo "PARALLEL_TEST_PROCESSORS=$(($(nproc) / 2))" >> $GITHUB_ENV echo "PARALLEL_TEST_PROCESSORS=$(($(nproc) / 2))" >> $GITHUB_ENV
- name: Set QUNIT_PARALLEL for QUnit tests
if: matrix.build_type == 'frontend'
run: |
echo "QUNIT_PARALLEL=$(($(nproc) / 2))" >> $GITHUB_ENV
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
@ -238,7 +243,7 @@ jobs:
- name: Plugin QUnit - name: Plugin QUnit
if: matrix.build_type == 'frontend' && matrix.target == 'plugins' if: matrix.build_type == 'frontend' && matrix.target == 'plugins'
run: QUNIT_WRITE_EXECUTION_FILE=1 QUNIT_PARALLEL=3 bin/rake plugin:qunit['*','1200000'] run: QUNIT_WRITE_EXECUTION_FILE=1 bin/rake plugin:qunit['*','1200000']
timeout-minutes: 30 timeout-minutes: 30
- name: Theme QUnit - name: Theme QUnit
@ -408,7 +413,8 @@ jobs:
- name: Core QUnit - name: Core QUnit
working-directory: ./app/assets/javascripts/discourse working-directory: ./app/assets/javascripts/discourse
run: yarn ember exam --path /tmp/emberbuild --load-balance --parallel=5 --launch "${{ env.TESTEM_BROWSER }}" --write-execution-file --random run: |
yarn ember exam --path /tmp/emberbuild --load-balance --parallel=$(($(nproc) / 2 + 1)) --launch "${{ env.TESTEM_BROWSER }}" --write-execution-file --random
timeout-minutes: 15 timeout-minutes: 15
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4