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
22 changes: 22 additions & 0 deletions .github/workflows/actions_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release GitHub Actions

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag for the release'
required: true

permissions:
contents: read

jobs:
release:
permissions:
actions: read
id-token: write
contents: write

uses: step-security/reusable-workflows/.github/workflows/actions_release.yaml@v1
with:
tag: '${{ github.event.inputs.tag }}'
28 changes: 28 additions & 0 deletions .github/workflows/audit_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: NPM Audit Fix Run

on:
workflow_dispatch:
inputs:
force:
description: 'Use --force flag for npm audit fix?'
required: true
type: boolean
base_branch:
description: 'Specify a base branch'
required: false
default: 'main'
schedule:
- cron: '0 0 * * 1'

jobs:
audit-fix:
uses: step-security/reusable-workflows/.github/workflows/audit_fix.yml@v1
with:
force: ${{ inputs.force || false }}
base_branch: ${{ inputs.base_branch || 'main' }}

permissions:
contents: write
pull-requests: write
packages: read
issues: write
32 changes: 32 additions & 0 deletions .github/workflows/auto_cherry_pick.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Auto Cherry-Pick from Upstream

on:
workflow_dispatch:
inputs:
base_branch:
description: 'Base branch to create the PR against'
required: true
default: 'main'
mode:
description: 'Run mode: cherry-pick or verify'
required: false
default: 'cherry-pick'

pull_request:
types: [opened, synchronize, labeled]

permissions:
contents: write
pull-requests: write
packages: read
issues: write

jobs:
cherry-pick:
if: github.event_name == 'workflow_dispatch' || contains(fromJson(toJson(github.event.pull_request.labels)).*.name, 'review-required')
uses: step-security/reusable-workflows/.github/workflows/auto_cherry_pick.yaml@v1
with:
original-owner: 'cypress-io'
repo-name: 'github-action'
base_branch: ${{ inputs.base_branch }}
mode: ${{ github.event_name == 'pull_request' && 'verify' || inputs.mode }}
36 changes: 36 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: check-dist
#
# step-security/cypress-io-github-action runs from the dist/ directory
# This workflow ensures that the contents of this directory
# are in sync with the source files by using
# npm run build which in turn calls ncc build
#
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:

jobs:
check-dist:
runs-on: ubuntu-24.04

steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24.14.0
- run: npm ci
- run: npm run format
- run: npm run build

- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
21 changes: 21 additions & 0 deletions .github/workflows/check-markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: check-markdown
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:

jobs:
check-markdown:
runs-on: ubuntu-24.04
name: Check Markdown files
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install dependencies
run: npm ci
- name: Check Markdown links
run: npm run check:markdown-links
- name: Check Markdown formatting
run: npm run format:markdown:check
44 changes: 44 additions & 0 deletions .github/workflows/example-basic-pnpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: example-basic-pnpm
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:

jobs:
basic-pnpm:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- windows-2025
- macos-26
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6

# See https://github.com/pnpm/action-setup
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

# See https://github.com/actions/setup-node
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.node-version'
cache: pnpm
cache-dependency-path: examples/basic-pnpm/pnpm-lock.yaml

- name: Cypress tests
uses: ./ # if copying, replace with step-security/cypress-io-github-action@v7
with:
package-manager-cache: false
working-directory: examples/basic-pnpm
# print information about detected browsers, etc
# see https://on.cypress.io/command-line#cypress-info
build: pnpm exec cypress info
70 changes: 70 additions & 0 deletions .github/workflows/example-basic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: example-basic
# This workflow represents a set of basic End-to-End tests
#
# 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: step-security/cypress-io-github-action@v7
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:

jobs:
basic:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
- windows-2025
- macos-26
- macos-26-intel
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Cypress tests
uses: ./
# the parameters below are only necessary
# because we are running these examples in a monorepo
with:
working-directory: examples/basic
# just for full picture after installing Cypress
# print information about detected browsers, etc
# see https://on.cypress.io/command-line#cypress-info
build: npx cypress info

basic-npm-cache:
# Use setup-node to cache npm dependencies
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
- windows-2025
- macos-26
- macos-26-intel
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: examples/basic/package-lock.json

- name: Cypress tests
uses: ./
with:
package-manager-cache: false
working-directory: examples/basic
build: npx cypress info
68 changes: 68 additions & 0 deletions .github/workflows/example-build-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: example-build-artifacts
# This workflow shows how to split build and test steps with artifacts.
# In the build job, dependencies are installed, the app is built and the build results
# are stored as an artifact using actions/upload-artifact.
# No tests are run in the build job.
# 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: step-security/cypress-io-github-action@v7
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Build app
uses: ./
with:
runTests: false # only build app, don't test yet
build: npm run build
working-directory: examples/nextjs
- name: Store build artifacts
uses: actions/upload-artifact@v7 # https://github.com/actions/upload-artifact
with:
name: app
path: examples/nextjs/build
if-no-files-found: error
retention-days: 1

test:
needs: build
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- windows-2025
- macos-26
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Restore build artifacts
uses: actions/download-artifact@v8 # https://github.com/actions/download-artifact
with:
name: app
path: examples/nextjs/build

- name: Cypress tests
uses: ./
with:
start: npm start # start server using the build artifacts
wait-on: http://localhost:3000
working-directory: examples/nextjs
28 changes: 28 additions & 0 deletions .github/workflows/example-chrome-for-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: example-chrome-for-testing
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:

jobs:
tests:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Chrome for Testing
# https://github.com/browser-actions/setup-chrome
uses: browser-actions/setup-chrome@v2
with:
chrome-version: 140
- name: Cypress info
uses: ./ # if copying, replace with step-security/cypress-io-github-action@v7
with:
# just for full picture after installing Cypress
# print information about detected browsers, etc
# see https://on.cypress.io/command-line#cypress-info
build: npm run info
working-directory: examples/browser
browser: chrome-for-testing
Loading
Loading