Skip to content

Commit

Permalink
Use default concurrency value for lerna run (#8462)
Browse files Browse the repository at this point in the history
The default concurrency value for leran run is the number of logical CPU
cores. This is better than arbitrarily using 4 threads, since different
machines may be able to handle more.
  • Loading branch information
dlarocque authored Sep 6, 2024
1 parent 15c36cc commit 3670ab8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Run unit tests
# Ignore auth and firestore since they're handled in their own separate jobs.
run: |
xvfb-run yarn lerna run --ignore '{firebase-messaging-integration-test,@firebase/auth*,@firebase/firestore*,firebase-firestore-integration-test}' --concurrency 4 test:ci
xvfb-run yarn lerna run --ignore '{firebase-messaging-integration-test,@firebase/auth*,@firebase/firestore*,firebase-firestore-integration-test}' test:ci
node scripts/print_test_logs.js
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
- name: Run unit tests
run: |
xvfb-run yarn lerna run --concurrency 4 test:ci --scope '@firebase/auth*'
xvfb-run yarn lerna run test:ci --scope '@firebase/auth*'
node scripts/print_test_logs.js
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
- name: Run unit tests
run: |
xvfb-run yarn lerna run --concurrency 4 test:ci --scope '@firebase/firestore*'
xvfb-run yarn lerna run test:ci --scope '@firebase/firestore*'
node scripts/print_test_logs.js
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"repl": "node tools/repl.js",
"release": "ts-node-script scripts/release/cli.ts",
"pretest": "node tools/pretest.js",
"test": "lerna run --ignore firebase-messaging-integration-test --concurrency 4 --stream test",
"test:ci": "lerna run --ignore firebase-messaging-integration-test --concurrency 4 test:ci",
"test": "lerna run --ignore firebase-messaging-integration-test --stream test",
"test:ci": "lerna run --ignore firebase-messaging-integration-test test:ci",
"pretest:coverage": "mkdirp coverage",
"ci:coverage": "lcov-result-merger 'packages/**/lcov.info' 'lcov-all.info'",
"test:coverage": "lcov-result-merger 'packages/**/lcov.info' | coveralls",
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci-test/test_changed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function runTests(config: TestConfig) {
process.exit(0);
}

const lernaCmd = ['lerna', 'run', '--concurrency', '4'];
const lernaCmd = ['lerna', 'run'];
console.log(chalk`{blue Running tests in:}`);
for (const task of testTasks) {
if (task.reason === TestReason.Changed) {
Expand Down

0 comments on commit 3670ab8

Please sign in to comment.