Unverified Commit 36b45c6f authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Break-up install and build steps for PR stats (#54536)

Breaks up these commands to track down the timeout for release stats. 

x-ref: https://github.com/vercel/next.js/actions/runs/5969590815/job/16195862006
parent 7ac6bb1a
...@@ -108,22 +108,24 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) { ...@@ -108,22 +108,24 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
if (!actionInfo.skipClone) { if (!actionInfo.skipClone) {
const usePnpm = await fs.pathExists(path.join(dir, 'pnpm-lock.yaml')) const usePnpm = await fs.pathExists(path.join(dir, 'pnpm-lock.yaml'))
let buildCommand = `cd ${dir}${ if (!statsConfig.skipInitialInstall) {
!statsConfig.skipInitialInstall await exec(
? usePnpm `cd ${dir}${
? // --no-frozen-lockfile is used here to tolerate lockfile usePnpm
// changes from merging latest changes ? // --no-frozen-lockfile is used here to tolerate lockfile
` && pnpm install --no-frozen-lockfile && pnpm run build` // changes from merging latest changes
: ' && yarn install --network-timeout 1000000' ` && pnpm install --no-frozen-lockfile`
: '' : ' && yarn install --network-timeout 1000000'
}` }`,
false
if (statsConfig.initialBuildCommand) { )
buildCommand += ` && ${statsConfig.initialBuildCommand}`
await exec(
statsConfig.initialBuildCommand ||
`cd ${dir} && ${usePnpm ? 'pnpm build' : 'echo built'}`,
false
)
} }
// allow high timeout for install + building all packages
// in case of noisy environment slowing down initial repo build
await exec(buildCommand, false, { timeout: 10 * 60 * 1000 })
} }
await fs await fs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment