Skip to content

Commit

Permalink
Run packing in tests in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
jankaifer committed Dec 15, 2022
1 parent 892eb61 commit df527e7
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/actions/next-stats-action/src/prepare/repo-setup.js
Expand Up @@ -129,16 +129,19 @@ module.exports = (actionInfo) => {

// wait to pack packages until after dependency paths have been updated
// to the correct versions
for (const pkgName of pkgDatas.keys()) {
const { pkg, pkgPath } = pkgDatas.get(pkgName)
await exec(`cd ${pkgPath} && yarn pack -f ${pkg}-packed.tgz`, true, {
env: {
// Yarn installed through corepack will not run in pnpm project without this env var set
// This var works for corepack >=0.15.0
COREPACK_ENABLE_STRICT: '0',
},
await Promise.all(
Array.from(pkgDatas.keys()).map(async (pkgName) => {
const { pkg, pkgPath } = pkgDatas.get(pkgName)
await exec(`cd ${pkgPath} && yarn pack -f ${pkg}-packed.tgz`, true, {
env: {
// Yarn installed through corepack will not run in pnpm project without this env var set
// This var works for corepack >=0.15.0
COREPACK_ENABLE_STRICT: '0',
},
})
})
}
)

return pkgPaths
},
}
Expand Down

0 comments on commit df527e7

Please sign in to comment.