Skip to content

Commit af1167b

Browse files
authored
fix(ci): eslint fails with "out of memory" #3156
Problem: eslint fails with "out of memory": > eslint -c .eslintrc.js --ext .ts . <--- Last few GCs ---> [3880:0000021FE7348970] 58049 ms: Mark-sweep 2019.3 (2094.8) … [3880:0000021FE7348970] 60283 ms: Mark-sweep 2023.0 (2098.5) … <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory Solution: Set `--max-old-space-size` for all steps except codecov.
1 parent c7637c2 commit af1167b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/node.js.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
vscode-version: [minimum, stable, insiders]
2020
env:
2121
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
22+
NODE_OPTIONS: '--max-old-space-size=8192'
2223
steps:
2324
- uses: actions/checkout@v2
2425
- name: Use Node.js ${{ matrix.node-version }}
@@ -29,12 +30,12 @@ jobs:
2930
- run: npm run vscode:prepublish
3031
- name: Tests
3132
uses: GabrielBB/xvfb-action@v1
32-
# `NODE_OPTIONS` should be isolated because of https://github.com/codecov/uploader/issues/475
33-
env:
34-
NODE_OPTIONS: '--max-old-space-size=8192'
3533
with:
3634
run: npm test
3735
- name: Code coverage
36+
env:
37+
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
38+
NODE_OPTIONS: ''
3839
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && ( github.ref == 'master' || github.event_name == 'pull_request' ) }}
3940
uses: codecov/codecov-action@v2
4041
with:
@@ -51,6 +52,7 @@ jobs:
5152
vscode-version: [stable, insiders]
5253
env:
5354
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
55+
NODE_OPTIONS: '--max-old-space-size=8192'
5456
steps:
5557
- uses: actions/checkout@v2
5658
- name: Use Node.js ${{ matrix.node-version }}
@@ -60,11 +62,11 @@ jobs:
6062
- run: npm ci
6163
- run: npm run vscode:prepublish
6264
- name: Tests
63-
# `NODE_OPTIONS` should be isolated because of https://github.com/codecov/uploader/issues/475
64-
env:
65-
NODE_OPTIONS: '--max-old-space-size=8192'
6665
run: npm test
6766
- name: Code coverage
67+
env:
68+
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
69+
NODE_OPTIONS: ''
6870
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && ( github.ref == 'master' || github.event_name == 'pull_request' ) }}
6971
uses: codecov/codecov-action@v2
7072
with:

0 commit comments

Comments
 (0)