diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47a6bb0a08..0ae8ea932e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,10 @@ jobs: which parallel # Verify installation - name: Test code run: test/run + env: + # Ubuntu runners ship GNU parallel, causing --tap + --jobs count mismatches. + # Force single-threaded on Linux; let macOS use parallel (installed above). + TEST_JOBS: ${{ runner.os == 'Linux' && '1' || 'detect' }} build-docs: runs-on: ubuntu-latest diff --git a/test/run b/test/run index 7846736654..1e88a2af2f 100755 --- a/test/run +++ b/test/run @@ -25,7 +25,8 @@ fi # AND that it is the GNU version of `parallel`. # If that is the case, try to guess the number of CPU cores, # so we can run `bats` in parallel processing mode, which is a lot faster. -if command -v parallel &> /dev/null \ +if [[ "${TEST_JOBS:-detect}" != "1" ]] \ + && command -v parallel &> /dev/null \ && parallel -V &> /dev/null \ && { parallel -V 2> /dev/null | grep -q '^GNU\>'; }; then # Expect to run at least on a dual-core CPU; slightly degraded performance