ci: check for clean git state in npm validation (#230479)
parent
ad047e27d5
commit
e178455531
|
@ -68,19 +68,27 @@ jobs:
|
|||
fi
|
||||
|
||||
echo "Attempt $attempt: Running npm ci"
|
||||
if npm ci --ignore-scripts; then
|
||||
echo "npm ci succeeded on attempt $attempt"
|
||||
exit 0
|
||||
if npm i --ignore-scripts; then
|
||||
if node build/npm/postinstall.js; then
|
||||
echo "npm i succeeded on attempt $attempt"
|
||||
exit 0
|
||||
else
|
||||
echo "node build/npm/postinstall.js failed on attempt $attempt"
|
||||
fi
|
||||
else
|
||||
echo "npm ci failed on attempt $attempt"
|
||||
echo "npm i failed on attempt $attempt"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "npm ci failed after 6 attempts"
|
||||
echo "npm i failed after 6 attempts"
|
||||
exit 1
|
||||
env:
|
||||
npm_command: 'install --ignore-scripts'
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Install dependencies with retries
|
||||
timeoutInMinutes: 400
|
||||
|
||||
- script: .github/workflows/check-clean-git-state.sh
|
||||
displayName: Check clean git state
|
||||
|
|
|
@ -60,7 +60,7 @@ function npmInstall(dir, opts) {
|
|||
run('sudo', ['chown', '-R', `${userinfo.uid}:${userinfo.gid}`, `${path.resolve(root, dir)}`], opts);
|
||||
} else {
|
||||
log(dir, 'Installing dependencies...');
|
||||
run(npm, [command], opts);
|
||||
run(npm, command.split(' '), opts);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
legacy-peer-deps="true"
|
||||
timeout=180000
|
Loading…
Reference in New Issue