Skip to content

Commit

Permalink
test(deps): install pnpm with npm (#1117)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcC399 committed Jan 25, 2024
1 parent f8558e8 commit 0a2b12a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/example-basic-pnpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down

0 comments on commit 0a2b12a

Please sign in to comment.