Skip to content

Commit b34bc43

Browse files
authored
Merge branch 'master' into update/nextjs-16
2 parents d7781d7 + 972213f commit b34bc43

File tree

2 files changed

+10
-22
lines changed

2 files changed

+10
-22
lines changed

.github/workflows/example-start-and-pnpm-workspaces.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
single-ws:
1919
# This job installs pnpm,
2020
# installs all dependencies,
21-
# caches the Cypress binary cache,
2221
# then runs Cypress tests in the single workspace
2322
# of the subfolder "packages/workspace-1".
2423
runs-on: ubuntu-24.04
@@ -32,15 +31,9 @@ jobs:
3231
run: npm install -g pnpm@10
3332

3433
- name: Install dependencies
35-
# with Cypress GitHub Action.
36-
# Calling the Cypress GitHub Action causes all dependencies from
37-
# the root of the pnpm workspace examples/start-and-pnpm-workspaces
38-
# to be installed
39-
# AND it automatically caches the Cypress binary.
40-
uses: ./
41-
with:
42-
working-directory: examples/start-and-pnpm-workspaces
43-
runTests: false
34+
# All dependencies including workspaces are installed
35+
run: pnpm install --frozen-lockfile
36+
working-directory: examples/start-and-pnpm-workspaces
4437

4538
- name: Cypress test Single
4639
# Run Cypress in examples/start-and-pnpm-workspaces/packages/workspace-1 only
@@ -49,7 +42,7 @@ jobs:
4942
# Do not attempt to install dependencies in the workspace using the action.
5043
# There is no pnpm-lock.yaml file in a workspace for
5144
# Cypress GitHub Action to use.
52-
# We already installed dependencies when we called the action previously.
45+
# We already installed dependencies previously.
5346
install: false
5447
working-directory: examples/start-and-pnpm-workspaces/packages/workspace-1
5548
build: pnpm run build
@@ -59,7 +52,6 @@ jobs:
5952
multiple-ws:
6053
# This job installs pnpm,
6154
# installs all dependencies,
62-
# caches the Cypress binary cache,
6355
# then runs Cypress tests in each of the workspaces.
6456
runs-on: ubuntu-24.04
6557
strategy:
@@ -77,10 +69,8 @@ jobs:
7769
run: npm install -g pnpm@10
7870

7971
- name: Install dependencies
80-
uses: ./
81-
with:
82-
working-directory: examples/start-and-pnpm-workspaces
83-
runTests: false
72+
run: pnpm install --frozen-lockfile
73+
working-directory: examples/start-and-pnpm-workspaces
8474

8575
- name: Cypress test Multiple
8676
# Run Cypress in

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,22 +1200,20 @@ jobs:
12001200

12011201
### pnpm workspaces
12021202

1203-
If you are using [pnpm workspaces](https://pnpm.io/workspaces) you need to install dependencies and run Cypress tests in a workspace in separate steps. The snippet below shows this principle.
1203+
The action does not directly support using [pnpm workspaces](https://pnpm.io/workspaces) (see feature request [#1144](https://github.com/cypress-io/github-action/issues/1144)). As a workaround, you can install dependencies and run Cypress tests in a workspace in separate steps. The snippet below shows this principle.
12041204

12051205
```yml
12061206
...
12071207
- name: Install dependencies
1208-
uses: cypress-io/github-action@v6
1209-
with:
1210-
working-directory: examples/start-and-pnpm-workspaces
1211-
runTests: false
1208+
run: pnpm install --frozen-lockfile
1209+
working-directory: examples/start-and-pnpm-workspaces
12121210
12131211
- name: Cypress test
12141212
uses: cypress-io/github-action@v6
12151213
with:
12161214
install: false
12171215
working-directory: examples/start-and-pnpm-workspaces/packages/workspace-1
1218-
...
1216+
...
12191217
```
12201218

12211219
[![pnpm workspaces example](https://github.com/cypress-io/github-action/actions/workflows/example-start-and-pnpm-workspaces.yml/badge.svg)](.github/workflows/example-start-and-pnpm-workspaces.yml)

0 commit comments

Comments
 (0)