Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/example-basic-pnpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ jobs:
cache-dependency-path: examples/basic-pnpm/pnpm-lock.yaml

- name: Cypress tests
# if you copy this workflow to another repository
# take the next line as replacement for ./
# uses: cypress-io/github-action@v6
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/basic-pnpm
# print information about detected browsers, etc
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/example-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ jobs:
uses: actions/checkout@v4

- name: Cypress tests
# normally you would write
# uses: cypress-io/github-action@v6
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
# the parameters below are only necessary
# because we are running these examples in a monorepo
with:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/example-build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ name: example-build-artifacts
# The test jobs use the results from the build job:
# - dependencies and the Cypress binary are installed using dependency caching
# - build results are restored using actions/download-artifact
#
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6
on:
push:
branches:
Expand All @@ -21,7 +27,7 @@ jobs:
uses: actions/checkout@v4

- name: Build app
uses: ./ # refers to local instance of cypress-io/github-action@v6
uses: ./
with:
runTests: false # only build app, don't test yet
build: npm run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/example-chrome-for-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
chrome-version: 137
- name: Cypress info
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
# just for full picture after installing Cypress
# print information about detected browsers, etc
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/example-chrome.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: example-chrome
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6
on:
push:
branches:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/example-component-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress run
# normally you would write
# uses: cypress-io/github-action@v6
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/component-tests
component: true
5 changes: 5 additions & 0 deletions .github/workflows/example-config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: example-config
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/example-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
uses: actions/checkout@v4

- name: Cypress nightly tests 🌃
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/basic
7 changes: 6 additions & 1 deletion .github/workflows/example-custom-ci-build-id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ name: example-custom-ci-build-id
# is generated _again_ on workflow re-run. This example
# shows how to create a unique ID then pass it to
# multiple testing jobs running in parallel.

#
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/example-custom-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v4

- name: Custom tests
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
command: npm run custom-test
working-directory: examples/custom-command
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/example-debug.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: example-debug

# This workflow demonstrates how to use the DEBUG environment variable to get debug output.
# See also https://github.com/cypress-io/github-action/blob/master/README.md#debugging and
# https://on.cypress.io/troubleshooting#Print-DEBUG-logs

#
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the above line with
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6

on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/example-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# replace with the following for regular use:
# uses: cypress-io/github-action@v6
- name: Cypress tests
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/basic
browser: ${{ matrix.browser }}
2 changes: 1 addition & 1 deletion .github/workflows/example-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: Cypress info
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
# just for full picture after installing Cypress
# print information about detected browsers, etc
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/example-env.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: example-env
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/example-firefox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: Firefox
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
timeout-minutes: 3
with:
# let's show browser and system info
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/example-install-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: Custom Yarn command
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/install-command
# https://classic.yarnpkg.com/en/docs/cli/install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/example-install-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: npm install cypress@15.0.0 --save-dev

- name: Cypress tests 🧪
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/install-only
install: false
3 changes: 2 additions & 1 deletion .github/workflows/example-node-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: ./
- name: Cypress tests
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/node-versions
2 changes: 1 addition & 1 deletion .github/workflows/example-quiet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# Install npm dependencies, cache them correctly
# and run all Cypress tests with `quiet` parameter
- name: Cypress run
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/quiet
quiet: true
5 changes: 5 additions & 0 deletions .github/workflows/example-recording.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: example-recording
# To set up this workflow to work with your own Cypress Cloud project
# refer to the README in the example directory examples/recording.
#
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6
on:
push:
branches:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/example-start-and-pnpm-workspaces.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: example-start-and-pnpm-workspaces
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6
on:
push:
branches:
Expand Down Expand Up @@ -45,7 +50,7 @@ jobs:

- name: Cypress test Single
# Run Cypress in examples/start-and-pnpm-workspaces/packages/workspace-1 only
uses: ./ # equivalent to using cypress-io/github-action@v6
uses: ./
with:
# Do not attempt to install dependencies in the workspace using the action.
# There is no pnpm-lock.yaml file in a workspace for
Expand Down Expand Up @@ -78,7 +83,7 @@ jobs:
run: npm install -g pnpm@10

- name: Install dependencies
uses: ./ # approximately equivalent to using cypress-io/github-action@v6
uses: ./
with:
working-directory: examples/start-and-pnpm-workspaces
runTests: false
Expand All @@ -87,7 +92,7 @@ jobs:
# Run Cypress in
# examples/start-and-pnpm-workspaces/packages/workspace-1 and
# examples/start-and-pnpm-workspaces/packages/workspace-2
uses: ./ # equivalent to using cypress-io/github-action@v6
uses: ./
with:
install: false
working-directory: ${{ matrix.cypress.working_directory }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/example-start-and-yarn-workspaces.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: example-start-and-yarn-workspaces
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6
on:
push:
branches:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/example-start.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: example-start
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6
on:
push:
branches:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/example-wait-on.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: example-wait-on
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: cypress-io/github-action@v6
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/example-webpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: Cypress tests
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/webpack
start: npm start
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/example-yarn-classic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
uses: actions/checkout@v4

- name: Test with Yarn Classic
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/yarn-classic
2 changes: 1 addition & 1 deletion .github/workflows/example-yarn-modern-pnp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
npm install -g corepack
corepack enable yarn
- name: Custom Yarn command
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/yarn-modern-pnp
# https://yarnpkg.com/cli/install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/example-yarn-modern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
npm install -g corepack
corepack enable yarn
- name: Custom Yarn command
uses: ./
uses: ./ # if copying, replace with cypress-io/github-action@v6
with:
working-directory: examples/yarn-modern
# https://yarnpkg.com/cli/install
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ Alternatively, to mitigate unforeseen breaks, bind to a specific [tag](https://g

The changes associated with each tag are shown under GitHub's [releases](https://github.com/cypress-io/github-action/releases) list. Refer also to the [CHANGELOG](./CHANGELOG.md) for an overview of major changes.

The workflows in the [examples](./examples/) directory use the latest commit from the repo's current branch. This allows all tests to run in CI before release. If you copy any of the examples to your own repo, you should replace `./` and specify instead the action and version as described above.

```yml
- uses: ./ # replace with cypress-io/github-action@v6
```

### Browser

Specify the browser name or path with the `browser` parameter. The default browser, if none is specified, is the built-in [Electron browser](https://on.cypress.io/guides/guides/launching-browsers#Electron-Browser).
Expand Down Expand Up @@ -660,7 +666,7 @@ jobs:
# Install npm dependencies, cache them correctly
# and run all Cypress tests with `quiet` parameter
- name: Cypress run
uses: ./
uses: cypress-io/github-action@v6
with:
working-directory: examples/quiet
quiet: true
Expand Down