From 717764b4a1eedbed26309f9d4468716f5493cbaf Mon Sep 17 00:00:00 2001 From: "Ali(Ako) Hosseini" Date: Sat, 19 Aug 2023 19:24:08 +0800 Subject: [PATCH] build: update jest max-worker --- .github/actions/build-and-test/action.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-and-test/action.yml b/.github/actions/build-and-test/action.yml index f2feddf62cc0..8a36e4936a9f 100644 --- a/.github/actions/build-and-test/action.yml +++ b/.github/actions/build-and-test/action.yml @@ -98,6 +98,6 @@ runs: - name: "Run tests" shell: bash -le {0} - run: npm test + run: JEST_MAX_WORKERS = 4 npm test \ No newline at end of file diff --git a/package.json b/package.json index ebf619fe94cf..376a6fc5babd 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "publish_package": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run publish_package $2 ;}; f", "serve": "f () { lerna exec --scope=@deriv/${1:-'*'} -- npm run serve $npm_config_open;}; f", "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 && JEST_MAX_WORKERS=6 npm run test:jest ;}; f", + "test": "f () { bash ./scripts/circleci-config.test.sh && npm run test:stylelint && npm run test:eslint-all && JEST_MAX_WORKERS=${JEST_MAX_WORKERS:-'45%'} npm run test:jest ;}; f", "test:stylelint": "stylelint \"./packages/*/src/**/*.s(a|c)ss\"", "test:jest": "jest --all --maxWorkers=${JEST_MAX_WORKERS:-'45%'}", "test:e2e": "cd end-to-end-test && npx playwright test",