Unverified Commit a4f94e52 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update test config to only install pnpm when needed (#37222)

parent 4340b4e6
...@@ -635,10 +635,6 @@ jobs: ...@@ -635,10 +635,6 @@ jobs:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.32.2
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with: with:
......
...@@ -431,6 +431,13 @@ describe('create next app', () => { ...@@ -431,6 +431,13 @@ describe('create next app', () => {
}) })
it('should use pnpm as the package manager on supplying --use-pnpm with example', async () => { it('should use pnpm as the package manager on supplying --use-pnpm with example', async () => {
try {
await execa('pnpm', ['--version'])
} catch (_) {
// install pnpm if not available
await execa('npm', ['i', '-g', 'pnpm'])
}
await usingTempDir(async (cwd) => { await usingTempDir(async (cwd) => {
const projectName = 'use-pnpm' const projectName = 'use-pnpm'
const res = await run( const res = await run(
......
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