Skip to content

Commit 2305e3b

Browse files
authored
ci: fix linux node_modules publish pipeline (microsoft#256781)
* ci: fix linux node_modules publish pipeline * fix: build
1 parent 5f1da36 commit 2305e3b

File tree

5 files changed

+40
-10
lines changed

5 files changed

+40
-10
lines changed

.github/workflows/pr-node-modules.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,23 @@ jobs:
113113
path: .build/node_modules_cache
114114
key: "node_modules-linux-${{ hashFiles('.build/packagelockhash') }}"
115115

116+
- name: Install build dependencies
117+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
118+
working-directory: build
119+
run: |
120+
set -e
121+
122+
for i in {1..5}; do # try 5 times
123+
npm ci && break
124+
if [ $i -eq 5 ]; then
125+
echo "Npm install failed too many times" >&2
126+
exit 1
127+
fi
128+
echo "Npm install failed $i, trying again..."
129+
done
130+
env:
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132+
116133
- name: Install dependencies
117134
if: steps.cache-node-modules.outputs.cache-hit != 'true'
118135
run: |

build/lib/tsb/builder.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/lib/tsb/builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ export function createTypeScriptBuilder(config: IConfiguration, projectFile: str
462462
const MB = 1024 * 1024;
463463
_log(
464464
'[tsb]',
465-
`time: ${colors.yellow((Date.now() - t1) + 'ms')} + \nmem: ${colors.cyan(Math.ceil(headNow / MB) + 'MB')} ${colors.bgcyan('delta: ' + Math.ceil((headNow - headUsed) / MB))}`
465+
`time: ${colors.yellow((Date.now() - t1) + 'ms')} + \nmem: ${colors.cyan(Math.ceil(headNow / MB) + 'MB')} ${colors.bgCyan('delta: ' + Math.ceil((headNow - headUsed) / MB))}`
466466
);
467467
headUsed = headNow;
468468
});

build/package-lock.json

Lines changed: 20 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@vscode/iconv-lite-umd": "0.7.0",
3939
"@vscode/ripgrep": "^1.15.13",
4040
"@vscode/vsce": "2.20.1",
41+
"ansi-colors": "^3.2.3",
4142
"byline": "^5.0.0",
4243
"debug": "^4.3.2",
4344
"electron-osx-sign": "^0.4.16",

0 commit comments

Comments
 (0)