Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Aug 25, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/actions/next-stats-action/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,22 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
if (!actionInfo.skipClone) {
const usePnpm = await fs.pathExists(path.join(dir, 'pnpm-lock.yaml'))

let buildCommand = `cd ${dir}${
!statsConfig.skipInitialInstall
ijjk marked this conversation as resolved.
Show resolved Hide resolved
? usePnpm
await exec(
`cd ${dir}${
usePnpm
? // --no-frozen-lockfile is used here to tolerate lockfile
// changes from merging latest changes
` && pnpm install --no-frozen-lockfile && pnpm run build`
` && pnpm install --no-frozen-lockfile`
: ' && yarn install --network-timeout 1000000'
: ''
}`
}`,
false
)

if (statsConfig.initialBuildCommand) {
buildCommand += ` && ${statsConfig.initialBuildCommand}`
}
// 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 exec(
statsConfig.initialBuildCommand ||
`cd ${dir} && ${usePnpm ? 'pnpm build' : 'echo built'}`,
false
)
}

await fs
Expand Down