Skip to content

Commit 51594fd

Browse files
authored
Merge pull request #689 from MikeMcC399/docs/working-directory
Update description of working-directory parameter for v10 and later
2 parents 93b467b + 2d80cc5 commit 51594fd

File tree

1 file changed

+40
-6
lines changed

1 file changed

+40
-6
lines changed

README.md

+40-6
Original file line numberDiff line numberDiff line change
@@ -827,18 +827,52 @@ See the [example-custom-ci-build-id.yml](./.github/workflows/example-custom-ci-b
827827

828828
### Working directory
829829

830-
In a monorepo, the end-to-end test might be placed in a different sub-folder from the application itself, like this
830+
In a monorepo, the end-to-end or component test might be placed in a different sub-folder from the application itself.
831+
832+
Using a [Cypress legacy configuration](https://docs.cypress.io/guides/references/legacy-configuration) (Version 9 or earlier) the structure could look like this:
831833

832834
```text
833835
repo/
834836
app/
835-
e2e/
836-
cypress
837+
app-test/
838+
cypress/
839+
fixtures/
840+
integration/
841+
plugins/
842+
support/
837843
cypress.json
838844
package.json
839845
```
840846

841-
You can specify the `e2e` working directory when running Cypress tests using `working-directory` parameter
847+
For End-to-End testing using a [Cypress configuration](https://docs.cypress.io/guides/references/configuration) for Version 10 and later, the structure could look like this :
848+
849+
```text
850+
repo/
851+
app/
852+
app-test/
853+
cypress/
854+
e2e/
855+
fixtures/
856+
support/
857+
cypress.config.js
858+
package.json
859+
```
860+
861+
Similarly for Component Testing with a [Cypress configuration](https://docs.cypress.io/guides/references/configuration) for Version 10 and later, the structure could look like this:
862+
863+
```text
864+
repo/
865+
app/
866+
app-test/
867+
cypress/
868+
component/
869+
fixtures/
870+
support/
871+
cypress.config.js
872+
package.json
873+
```
874+
875+
You can specify the `app-test` working directory when running Cypress tests using the `working-directory` parameter
842876

843877
```yml
844878
on: [push]
@@ -850,10 +884,10 @@ jobs:
850884
- uses: cypress-io/github-action@v5
851885
with:
852886
start: npm start
853-
working-directory: e2e
887+
working-directory: app-test
854888
```
855889

856-
See [cypress-gh-action-monorepo](https://github.com/bahmutov/cypress-gh-action-monorepo) for a running example
890+
See [example-basic.yml](.github/workflows/example-basic.yml) for an End-to-End test example and [example-component-test.yml](.github/workflows/example-component-test.yml) for a Component test example, using the parameter `working-directory`.
857891

858892
### Subfolders
859893

0 commit comments

Comments
 (0)