Skip to content

Commit

Permalink
Merge branch 'cypress-io:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ViacheslavKudinov authored Jan 17, 2025
2 parents 1b8e446 + b86ab8d commit 8581fd9
Show file tree
Hide file tree
Showing 280 changed files with 85,519 additions and 186,894 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/add-issue-to-triage-board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Add issue/PR to Triage Board'
on:
issues:
types:
- opened
pull_request_target:
types:
- opened
jobs:
add-to-triage-project-board:
# skip in fork
if: github.repository == 'cypress-io/github-action'
uses: cypress-io/cypress/.github/workflows/triage_add_to_project.yml@develop
secrets: inherit
40 changes: 40 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: check-dist
#
# 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:
- 'master'
pull_request:
workflow_dispatch:

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

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
# Action runs: using: node20 as defined in
# https://github.com/cypress-io/github-action/blob/master/action.yml
# Node.js minor version is aligned to
# https://github.com/actions/runner/blob/main/src/Misc/externals.sh
node-version: 20.18.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
6 changes: 3 additions & 3 deletions .github/workflows/check-markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:

jobs:
check-markdown-links:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
name: Check links in Markdown files
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: bahmutov/npm-install@v1
uses: actions/checkout@v4
- run: npm ci
- run: npm run check:markdown
208 changes: 20 additions & 188 deletions .github/workflows/example-basic-pnpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,206 +7,38 @@ on:
workflow_dispatch:

jobs:
# ~~~~~~~~~~~~~~~~~~ Cypress v9 and below (using Legacy configuration) ~~~~~~~~~~~~~~~~~~~ #

basic-pnpm-ubuntu-20-v9:
runs-on: ubuntu-20.04
basic-pnpm:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Cypress tests
# normally you would write
# uses: cypress-io/github-action@v5
uses: ./
# the parameters below are only necessary
# because we are running these examples in a monorepo
with:
working-directory: examples/v9/basic-pnpm
# 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-pnpm-ubuntu-22-v9:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Cypress tests
uses: ./
with:
working-directory: examples/v9/basic-pnpm
build: npx cypress info

basic-pnpm-on-windows-v9:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Cypress tests
uses: ./
# See https://github.com/actions/setup-node
- name: Install Node.js
uses: actions/setup-node@v4
with:
working-directory: examples/v9/basic-pnpm
build: npx cypress info

basic-pnpm-on-mac-v9:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Cypress tests
uses: ./
with:
working-directory: examples/v9/basic-pnpm
build: npx cypress info

# skips the binary installation
# shows that the job should not fail
# https://github.com/cypress-io/github-action/issues/327
basic-pnpm-without-binary-install-v9:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
node-version: 22
cache: 'pnpm'
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: ./
with:
working-directory: examples/v9/basic-pnpm
# since we do not install Cypress
# we should not attempt to run tests
runTests: false
env:
# skip the binary install
CYPRESS_INSTALL_BINARY: 0

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cypress v10 and higher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #

basic-pnpm-ubuntu-20:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Cypress tests
# normally you would write
# uses: cypress-io/github-action@v5
uses: ./
# the parameters below are only necessary
# because we are running these examples in a monorepo
with:
working-directory: examples/basic-pnpm
# 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-pnpm-ubuntu-22:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Cypress tests
uses: ./
with:
working-directory: examples/basic-pnpm
build: npx cypress info

basic-pnpm-on-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Cypress tests
uses: ./
with:
working-directory: examples/basic-pnpm
build: npx cypress info

basic-pnpm-on-mac:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Cypress tests
uses: ./
with:
working-directory: examples/basic-pnpm
build: npx cypress info

# skips the binary installation
# shows that the job should not fail
# https://github.com/cypress-io/github-action/issues/327
basic-pnpm-without-binary-install:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Cypress tests
uses: ./
with:
working-directory: examples/basic-pnpm
# since we do not install Cypress
# we should not attempt to run tests
runTests: false
env:
# skip the binary install
CYPRESS_INSTALL_BINARY: 0
build: pnpm exec cypress info
Loading

0 comments on commit 8581fd9

Please sign in to comment.