Skip to content

Commit

Permalink
remove: test jest perf by setting workers
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotell committed Oct 24, 2024
1 parent 7ecc2a4 commit fe0b091
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,21 @@ jobs:
run: |
yarn nx format:check --base origin/master
- name: v0,v8 jest test perf experiments worker 50%
run: |
yarn nx run-many -t build -p react,react-northstar
yarn nx run react:test
yarn nx run react-northstar:test
- name: v0,v8 jest test perf experiments worker 1
run: |
yarn nx reset
yarn nx run-many -t build -p react,react-northstar
FLUENT_WORKER=1 yarn nx run react:test
FLUENT_WORKER=1 yarn nx run react-northstar:test
- name: build, test, lint, test-ssr (affected)
run: |
yarn nx affected -t build test lint type-check test-ssr test-integration verify-packaging --nxBail
Expand Down
4 changes: 3 additions & 1 deletion scripts/jest/src/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*
* based on testing spawning only 50% of available workers is fastest on both Local Machine and CI env atm ( 8 Core machine, 16GB RAM)
*/
const workersConfig = { maxWorkers: '50%' };

const workersConfig = { maxWorkers: process.env.FLUENT_WORKER || '50%' };
console.log({ workerEnv: process.env.FLUENT_WORKER, workersConfig });

exports.workersConfig = workersConfig;

0 comments on commit fe0b091

Please sign in to comment.