From 2c849fc2f3082084fde312afaf414b223710c4b5 Mon Sep 17 00:00:00 2001 From: Anton Biriukov Date: Thu, 22 Apr 2021 03:38:18 -0400 Subject: [PATCH] Added CPU cores calculation for concurrency worker --- .github/workflows/node-js-ci.yml | 4 +++- .github/workflows/release.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-js-ci.yml b/.github/workflows/node-js-ci.yml index 684ea1b1f0..1bb801f76b 100644 --- a/.github/workflows/node-js-ci.yml +++ b/.github/workflows/node-js-ci.yml @@ -57,10 +57,12 @@ jobs: - uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node-version }} + - name: Get number of CPU cores + uses: SimenB/github-actions-cpu-cores@v1 - name: Install dependencies and run tests with default env run: | npm install - npm run jest + npm run jest --max-workers ${{ steps.cpu-cores.outputs.count }} # Run end-to-end tests along with the microservices in docker-compose on Linux e2e: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b88d433c2..98e0312bcd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,10 +57,12 @@ jobs: - uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node-version }} + - name: Get number of CPU cores + uses: SimenB/github-actions-cpu-cores@v1 - name: Install dependencies and run tests with default env run: | npm install - npm run jest + npm run jest --max-workers ${{ steps.cpu-cores.outputs.count }} # Run end-to-end tests along with the microservices in docker-compose on Linux e2e: