@cypress/github-action 5.6.2 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -1
- package/dist/index.js +5 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# cypress-io/github-action [![Action status][ci-badge]][ci-workflow] [![cypress][cloud-badge]][cloud-project] [![renovate-app badge][renovate-badge]][renovate-bot]
|
|
2
2
|
|
|
3
|
-
> [GitHub Action](https://docs.github.com/en/actions) for running [Cypress](https://www.cypress.io) end-to-end and component tests. Includes npm installation, custom caching and lots of configuration options.
|
|
3
|
+
> [GitHub Action](https://docs.github.com/en/actions) for running [Cypress](https://www.cypress.io) end-to-end and component tests. Includes npm, pnpm and Yarn installation, custom caching and lots of configuration options.
|
|
4
4
|
|
|
5
5
|
## Examples
|
|
6
6
|
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
- Use [pnpm](#pnpm)
|
|
41
41
|
- Use [Yarn Classic](#yarn-classic)
|
|
42
42
|
- Use [Yarn Modern](#yarn-modern)
|
|
43
|
+
- Use [Yarn Plug'n'Play](#yarn-plugnplay)
|
|
43
44
|
- Use [Yarn workspaces](#yarn-workspaces)
|
|
44
45
|
- Use [custom cache key](#custom-cache-key)
|
|
45
46
|
- Run tests on multiple [Node versions](#node-versions)
|
|
@@ -1077,6 +1078,31 @@ See [example-yarn-modern.yml](.github/workflows/example-yarn-modern.yml) for an
|
|
|
1077
1078
|
|
|
1078
1079
|
[](.github/workflows/example-yarn-modern.yml)
|
|
1079
1080
|
|
|
1081
|
+
### Yarn Plug'n'Play
|
|
1082
|
+
|
|
1083
|
+
When using [Yarn Modern](https://yarnpkg.com/) (Yarn 2 and later) with [Plug'n'Play](https://yarnpkg.com/features/pnp) enabled, you will need to use the `command` parameter to run [yarn dlx](https://yarnpkg.com/cli/dlx) instead of [npx](https://docs.npmjs.com/cli/v9/commands/npx).
|
|
1084
|
+
|
|
1085
|
+
```yaml
|
|
1086
|
+
name: example-yarn-modern-pnp
|
|
1087
|
+
on: push
|
|
1088
|
+
jobs:
|
|
1089
|
+
yarn-classic:
|
|
1090
|
+
runs-on: ubuntu-22.04
|
|
1091
|
+
steps:
|
|
1092
|
+
- name: Checkout
|
|
1093
|
+
uses: actions/checkout@v3
|
|
1094
|
+
- name: Cypress run
|
|
1095
|
+
uses: cypress-io/github-action@v5
|
|
1096
|
+
with:
|
|
1097
|
+
working-directory: examples/yarn-modern-pnp
|
|
1098
|
+
install-command: yarn install
|
|
1099
|
+
command: yarn dlx cypress run
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
[](https://github.com/cypress-io/github-action/actions/workflows/example-yarn-modern-pnp.yml)
|
|
1103
|
+
|
|
1104
|
+
**Caution**: using the action parameter `command` causes multiple other parameters to be ignored. [See `command` section for more information.](#custom-test-command)
|
|
1105
|
+
|
|
1080
1106
|
### Yarn workspaces
|
|
1081
1107
|
|
|
1082
1108
|
This action should discover the Yarn workspaces correctly. For example, see folder [examples/start-and-yarn-workspaces](examples/start-and-yarn-workspaces) and workflow file [example-start-and-yarn-workspaces.yml](.github/workflows/example-start-and-yarn-workspaces.yml)
|
package/dist/index.js
CHANGED
|
@@ -75008,10 +75008,6 @@ const runTests = async () => {
|
|
|
75008
75008
|
quiet: getInputBool('quiet'),
|
|
75009
75009
|
component: getInputBool('component')
|
|
75010
75010
|
}
|
|
75011
|
-
const cypressModulePath =
|
|
75012
|
-
require.resolve('cypress', { paths: [workingDirectory] }) ||
|
|
75013
|
-
'cypress'
|
|
75014
|
-
const cypress = require(cypressModulePath)
|
|
75015
75011
|
const runTests = getInputBool('runTests', true)
|
|
75016
75012
|
const spec = getSpecsList()
|
|
75017
75013
|
|
|
@@ -75033,6 +75029,11 @@ const runTests = async () => {
|
|
|
75033
75029
|
return runTestsUsingCommandLine()
|
|
75034
75030
|
}
|
|
75035
75031
|
|
|
75032
|
+
const cypressModulePath =
|
|
75033
|
+
require.resolve('cypress', { paths: [workingDirectory] }) ||
|
|
75034
|
+
'cypress'
|
|
75035
|
+
const cypress = require(cypressModulePath)
|
|
75036
|
+
|
|
75036
75037
|
debug('Running Cypress tests using NPM module API')
|
|
75037
75038
|
debug(`requiring cypress dependency, cwd is ${process.cwd()}`)
|
|
75038
75039
|
debug(`working directory ${workingDirectory}`)
|