diff --git a/.github/workflows/example-basic-pnpm.yml b/.github/workflows/example-basic-pnpm.yml index eb03df0d8..1dbeb90b0 100644 --- a/.github/workflows/example-basic-pnpm.yml +++ b/.github/workflows/example-basic-pnpm.yml @@ -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 diff --git a/.github/workflows/example-basic.yml b/.github/workflows/example-basic.yml index b76a7d61d..50947a7f0 100644 --- a/.github/workflows/example-basic.yml +++ b/.github/workflows/example-basic.yml @@ -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: diff --git a/.github/workflows/example-build-artifacts.yml b/.github/workflows/example-build-artifacts.yml index 53a69c436..d00f803d1 100644 --- a/.github/workflows/example-build-artifacts.yml +++ b/.github/workflows/example-build-artifacts.yml @@ -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: @@ -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 diff --git a/.github/workflows/example-chrome-for-testing.yml b/.github/workflows/example-chrome-for-testing.yml index b615fca35..34c885b1e 100644 --- a/.github/workflows/example-chrome-for-testing.yml +++ b/.github/workflows/example-chrome-for-testing.yml @@ -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 diff --git a/.github/workflows/example-chrome.yml b/.github/workflows/example-chrome.yml index 31504867e..6a28e15bc 100644 --- a/.github/workflows/example-chrome.yml +++ b/.github/workflows/example-chrome.yml @@ -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: diff --git a/.github/workflows/example-component-test.yml b/.github/workflows/example-component-test.yml index c56583473..0ed9bd1f3 100644 --- a/.github/workflows/example-component-test.yml +++ b/.github/workflows/example-component-test.yml @@ -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 diff --git a/.github/workflows/example-config.yml b/.github/workflows/example-config.yml index 2bff182d0..609f7650c 100644 --- a/.github/workflows/example-config.yml +++ b/.github/workflows/example-config.yml @@ -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: diff --git a/.github/workflows/example-cron.yml b/.github/workflows/example-cron.yml index 1faf82c3d..96c92e488 100644 --- a/.github/workflows/example-cron.yml +++ b/.github/workflows/example-cron.yml @@ -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 diff --git a/.github/workflows/example-custom-ci-build-id.yml b/.github/workflows/example-custom-ci-build-id.yml index 0f025b9c0..b35ebb82c 100644 --- a/.github/workflows/example-custom-ci-build-id.yml +++ b/.github/workflows/example-custom-ci-build-id.yml @@ -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: diff --git a/.github/workflows/example-custom-command.yml b/.github/workflows/example-custom-command.yml index a5cb6206e..f73d49708 100644 --- a/.github/workflows/example-custom-command.yml +++ b/.github/workflows/example-custom-command.yml @@ -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 diff --git a/.github/workflows/example-debug.yml b/.github/workflows/example-debug.yml index 7a54411bf..6d2672690 100644 --- a/.github/workflows/example-debug.yml +++ b/.github/workflows/example-debug.yml @@ -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: diff --git a/.github/workflows/example-docker.yml b/.github/workflows/example-docker.yml index 0c0cd563e..dbf2bf34a 100644 --- a/.github/workflows/example-docker.yml +++ b/.github/workflows/example-docker.yml @@ -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 }} diff --git a/.github/workflows/example-edge.yml b/.github/workflows/example-edge.yml index 08973c8f3..dbd8fd23d 100644 --- a/.github/workflows/example-edge.yml +++ b/.github/workflows/example-edge.yml @@ -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 diff --git a/.github/workflows/example-env.yml b/.github/workflows/example-env.yml index 355ce9a49..21cc2309a 100644 --- a/.github/workflows/example-env.yml +++ b/.github/workflows/example-env.yml @@ -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: diff --git a/.github/workflows/example-firefox.yml b/.github/workflows/example-firefox.yml index 4e58bdce1..45e6f3c79 100644 --- a/.github/workflows/example-firefox.yml +++ b/.github/workflows/example-firefox.yml @@ -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 diff --git a/.github/workflows/example-install-command.yml b/.github/workflows/example-install-command.yml index 39a623021..9b87a5f88 100644 --- a/.github/workflows/example-install-command.yml +++ b/.github/workflows/example-install-command.yml @@ -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 diff --git a/.github/workflows/example-install-only.yml b/.github/workflows/example-install-only.yml index ab6914fd1..31186f454 100644 --- a/.github/workflows/example-install-only.yml +++ b/.github/workflows/example-install-only.yml @@ -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 diff --git a/.github/workflows/example-node-versions.yml b/.github/workflows/example-node-versions.yml index e76dd3b7d..dba5c2275 100644 --- a/.github/workflows/example-node-versions.yml +++ b/.github/workflows/example-node-versions.yml @@ -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 diff --git a/.github/workflows/example-quiet.yml b/.github/workflows/example-quiet.yml index fc5c9ffff..8a84295cb 100644 --- a/.github/workflows/example-quiet.yml +++ b/.github/workflows/example-quiet.yml @@ -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 diff --git a/.github/workflows/example-recording.yml b/.github/workflows/example-recording.yml index b4fb71418..09911b4aa 100644 --- a/.github/workflows/example-recording.yml +++ b/.github/workflows/example-recording.yml @@ -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: diff --git a/.github/workflows/example-start-and-pnpm-workspaces.yml b/.github/workflows/example-start-and-pnpm-workspaces.yml index 484640091..78fc779cc 100644 --- a/.github/workflows/example-start-and-pnpm-workspaces.yml +++ b/.github/workflows/example-start-and-pnpm-workspaces.yml @@ -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: @@ -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 @@ -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 @@ -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 }} diff --git a/.github/workflows/example-start-and-yarn-workspaces.yml b/.github/workflows/example-start-and-yarn-workspaces.yml index 148013a05..92f38ff17 100644 --- a/.github/workflows/example-start-and-yarn-workspaces.yml +++ b/.github/workflows/example-start-and-yarn-workspaces.yml @@ -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: diff --git a/.github/workflows/example-start.yml b/.github/workflows/example-start.yml index ac87551bf..e2057bbee 100644 --- a/.github/workflows/example-start.yml +++ b/.github/workflows/example-start.yml @@ -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: diff --git a/.github/workflows/example-wait-on.yml b/.github/workflows/example-wait-on.yml index 5ca3ceb3c..a11dbc324 100644 --- a/.github/workflows/example-wait-on.yml +++ b/.github/workflows/example-wait-on.yml @@ -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: diff --git a/.github/workflows/example-webpack.yml b/.github/workflows/example-webpack.yml index 2a13fbce9..19f81e8d3 100644 --- a/.github/workflows/example-webpack.yml +++ b/.github/workflows/example-webpack.yml @@ -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 diff --git a/.github/workflows/example-yarn-classic.yml b/.github/workflows/example-yarn-classic.yml index 76053d344..3143e7ef1 100644 --- a/.github/workflows/example-yarn-classic.yml +++ b/.github/workflows/example-yarn-classic.yml @@ -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 diff --git a/.github/workflows/example-yarn-modern-pnp.yml b/.github/workflows/example-yarn-modern-pnp.yml index d73fa6066..c709fd826 100644 --- a/.github/workflows/example-yarn-modern-pnp.yml +++ b/.github/workflows/example-yarn-modern-pnp.yml @@ -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 diff --git a/.github/workflows/example-yarn-modern.yml b/.github/workflows/example-yarn-modern.yml index 558959943..584a6d064 100644 --- a/.github/workflows/example-yarn-modern.yml +++ b/.github/workflows/example-yarn-modern.yml @@ -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 diff --git a/README.md b/README.md index 38265ad34..5d939fcc0 100644 --- a/README.md +++ b/README.md @@ -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). @@ -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