ci: check for clean git state in npm validation (#230479)

This commit is contained in:
Robo 2024-10-05 03:04:18 +09:00 committed by GitHub
parent ad047e27d5
commit e178455531
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 6 deletions

View File

@ -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

View File

@ -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);
}
}

2
test/monaco/.npmrc Normal file
View File

@ -0,0 +1,2 @@
legacy-peer-deps="true"
timeout=180000