diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index bfad532d50de..bf94fb5cd355 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -3,6 +3,8 @@ on: pull_request: branches: - '**' + env: + JEST_MAX_WORKERS: 4 push: branches: - master @@ -21,7 +23,7 @@ jobs: npm install npm run bootstrap npm run build:all - npm run test:jest 4 + npm run test:jest - name: Upload coverage to Codecov uses: codecov/codecov-action@v3.1.1 diff --git a/package.json b/package.json index 260f7ae54e7e..57eaf99bbe17 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "start": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run start ;}; f", "test": "f () { bash ./scripts/circleci-config.test.sh && npm run test:stylelint && npm run test:eslint-all && npm run test:jest ;}; f", "test:stylelint": "stylelint \"./packages/*/src/**/*.s(a|c)ss\"", - "test:jest": "jest --all --maxWorkers=${1:-8}", + "test:jest": "jest --all --maxWorkers=${JEST_MAX_WORKERS:-'45%'}", "test:e2e": "cd end-to-end-test && npx playwright test", "test:e2e-dev": "cd end-to-end-test && npx playwright test --trace on && npx playwright show-report", "test:performance": "cd e2e_tests && jest -c ./jest.config.js --maxWorkers=2 --detectOpenHandles performance",