From b586f2cb986821dae7816afa732f516b546bd6bd Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Mon, 26 Aug 2024 08:42:35 +0800 Subject: [PATCH] DEV: Don't hardcode number of parallel processes for QUnit (#28535) --- .github/workflows/tests.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 873c70bb9c6..95074b58b56 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,11 +73,16 @@ jobs: if: matrix.build_type == 'system' 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' run: | 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 with: fetch-depth: 1 @@ -238,7 +243,7 @@ jobs: - name: Plugin QUnit 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 - name: Theme QUnit @@ -408,7 +413,8 @@ jobs: - name: Core QUnit 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 - uses: actions/upload-artifact@v4