Skip to content

Commit cae1e1a

Browse files
authored
Merge pull request Expensify#75553 from gelocraft/fix-test-workflow-failure-problem
[No QA] fix(ci/test): set node --max-old-space-size=8192 and jest --maxWorker=2
2 parents fde1022 + 747d9dc commit cae1e1a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
env:
1919
CI: true
20-
NODE_OPTIONS: --max_old_space_size=8192
20+
NODE_OPTIONS: "--experimental-vm-modules --max-old-space-size=8192"
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
chunk: [ 1, 2, 3, 4 ]
24+
chunk: [1, 2, 3, 4, 5, 6, 7, 8]
2525
name: test (job ${{ fromJSON(matrix.chunk) }})
2626
steps:
2727
- name: Checkout
@@ -44,7 +44,7 @@ jobs:
4444
key: ${{ runner.os }}-jest
4545

4646
- name: Jest tests
47-
run: NODE_OPTIONS="$NODE_OPTIONS --experimental-vm-modules" npm test -- --silent --shard=${{ fromJSON(matrix.chunk) }}/${{ strategy.job-total }} --maxWorkers=4 --coverage --coverageDirectory=coverage/shard-${{ matrix.chunk }}
47+
run: npm test -- --silent --shard=${{ fromJSON(matrix.chunk) }}/${{ strategy.job-total }} --maxWorkers=2 --coverage --coverageDirectory=coverage/shard-${{ matrix.chunk }}
4848

4949
- name: Upload coverage to Codecov (PRs - tokenless)
5050
if: ${{ github.event_name == 'pull_request' }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"ios-hybrid-build": "bundle exec fastlane ios build_unsigned_hybrid",
4343
"android-build": "bundle exec fastlane android build_local",
4444
"android-hybrid-build": "bundle exec fastlane android build_local_hybrid",
45-
"test": "TZ=utc NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=4096\" jest",
45+
"test": "TZ=utc NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=8192\" jest",
4646
"test:verbose": "TZ=utc NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=4096\" JEST_VERBOSE=true jest",
4747
"test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand",
4848
"perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure",

tests/ui/SessionTest.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const TEST_USER_LOGIN_2 = '[email protected]';
3535
// cspell:disable-next-line
3636
const TEST_AUTH_TOKEN_2 = 'zxcvbnm';
3737

38-
jest.setTimeout(60000);
38+
jest.setTimeout(120000);
3939
TestHelper.setupApp();
4040
TestHelper.setupGlobalFetchMock();
4141

0 commit comments

Comments
 (0)