From 0a2b12a37a60c7d8cea11d2cc2f7660f5b8d68fd Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Thu, 25 Jan 2024 16:01:09 +0100 Subject: [PATCH] test(deps): install pnpm with npm (#1117) --- .github/workflows/example-basic-pnpm.yml | 20 +++++--------------- README.md | 6 ++---- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/example-basic-pnpm.yml b/.github/workflows/example-basic-pnpm.yml index fb3c850cf..4b49c2113 100644 --- a/.github/workflows/example-basic-pnpm.yml +++ b/.github/workflows/example-basic-pnpm.yml @@ -15,9 +15,7 @@ jobs: uses: actions/checkout@v4 - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 + run: npm install -g pnpm@8 - name: Get pnpm store directory shell: bash @@ -52,9 +50,7 @@ jobs: uses: actions/checkout@v4 - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 + run: npm install -g pnpm@8 - name: Get pnpm store directory shell: bash @@ -82,9 +78,7 @@ jobs: uses: actions/checkout@v4 - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 + run: npm install -g pnpm@8 - name: Get pnpm store directory shell: bash @@ -112,9 +106,7 @@ jobs: uses: actions/checkout@v4 - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 + run: npm install -g pnpm@8 - name: Get pnpm store directory shell: bash @@ -145,9 +137,7 @@ jobs: uses: actions/checkout@v4 - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 + run: npm install -g pnpm@8 - name: Get pnpm store directory shell: bash diff --git a/README.md b/README.md index 4cc6cef60..8a83bd2df 100644 --- a/README.md +++ b/README.md @@ -1103,7 +1103,7 @@ jobs: ### pnpm -The package manager `pnpm` is not pre-installed in [GitHub Actions runner images](https://github.com/actions/runner-images) (unlike `npm` and `yarn`): to install `pnpm` include [pnpm/action-setup](https://github.com/pnpm/action-setup) in your workflow. If the action finds a `pnpm-lock.yaml` file, it uses the [pnpm](https://pnpm.io/cli/install) command `pnpm install --frozen-lockfile` by default to install dependencies. +The package manager `pnpm` is not pre-installed in [GitHub Actions runner images](https://github.com/actions/runner-images) (unlike `npm` and `yarn`) and so it must be installed in a separate workflow step (see below). If the action finds a `pnpm-lock.yaml` file, it uses the [pnpm](https://pnpm.io/cli/install) command `pnpm install --frozen-lockfile` by default to install dependencies. At this time the action does not automatically cache dependencies installed by pnpm. The example below includes steps to locate the pnpm store directory and to cache its contents for later use. ```yaml @@ -1116,9 +1116,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 + run: npm install -g pnpm@8 - name: Get pnpm store directory shell: bash run: |