Skip to content

Commit

Permalink
feat: archive v9 examples (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcC399 authored Aug 24, 2023
1 parent fa88e4a commit a6333aa
Show file tree
Hide file tree
Showing 149 changed files with 6 additions and 87,003 deletions.
103 changes: 0 additions & 103 deletions .github/workflows/example-basic-pnpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,109 +7,6 @@ on:
workflow_dispatch:

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

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

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

- 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: 7

- 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: 7

- name: Cypress tests
uses: ./
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: 7

- 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: 7

- name: Cypress tests
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
Expand Down
78 changes: 0 additions & 78 deletions .github/workflows/example-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,84 +8,6 @@ on:
workflow_dispatch:

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

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

- 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
# 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-ubuntu-22-v9:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

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

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

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

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

- name: Cypress tests
uses: ./
with:
working-directory: examples/v9/basic
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-without-binary-install-v9:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cypress tests
uses: ./
with:
working-directory: examples/v9/basic
# 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-ubuntu-20:
runs-on: ubuntu-20.04
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/example-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,64 +8,6 @@ on:

jobs:

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

tests-v9:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cypress info
uses: ./
with:
# 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
working-directory: examples/v9/browser

- name: Chrome
uses: ./
with:
working-directory: examples/v9/browser
browser: chrome

- uses: actions/upload-artifact@v3
with:
name: screenshots-in-chrome-v9
path: examples/v9/browser/cypress/screenshots

- uses: actions/upload-artifact@v3
with:
name: video-in-chrome-v9
path: examples/v9/browser/cypress/videos

- run: npx image-size cypress/screenshots/**/*.png
working-directory: examples/v9/browser

- name: Chrome headed
uses: ./
with:
working-directory: examples/v9/browser
browser: chrome
headed: true

- uses: actions/upload-artifact@v3
with:
name: screenshots-in-headed-chrome-v9
path: examples/v9/browser/cypress/screenshots

- uses: actions/upload-artifact@v3
with:
name: video-in-headed-chrome-v9
path: examples/v9/browser/cypress/videos

- run: npx image-size cypress/screenshots/**/*.png
working-directory: examples/v9/browser

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

tests:
runs-on: ubuntu-22.04
steps:
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,64 +8,6 @@ on:

jobs:

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

start-v9:
# example where we pass custom base URL
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cypress tests
uses: ./
with:
working-directory: examples/v9/config
build: npm run build
start: npm start
wait-on: 'http://localhost:3333'
config: baseUrl=http://localhost:3333

separate-specs-v9:
# example where we pass specs to run via multiple lines
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cypress tests
uses: ./
with:
working-directory: examples/v9/config
build: npm run build
start: npm start
wait-on: 'http://localhost:3333'
config: baseUrl=http://localhost:3333
spec: |
cypress/integration/spec-a.js
cypress/integration/spec-b.js
separate-specs-with-wildcard-v9:
# example where we pass specs to run via multiple lines and wildcards
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cypress tests
uses: ./
with:
working-directory: examples/v9/config
build: npm run build
start: npm start
wait-on: 'http://localhost:3333'
config: baseUrl=http://localhost:3333
spec: |
cypress/integration/spec-a.js
cypress/**/*-b.js
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cypress v10 and higher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #

start:
# example where we pass custom base URL
runs-on: ubuntu-22.04
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/example-custom-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,6 @@ on:

jobs:

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

start-v9:
# example where instead of forming the default "cypress run ..."
# the user can specify their own command
runs-on: ubuntu-22.04
steps:
- name: Checkout 🛎
uses: actions/checkout@v3

- name: Custom tests 🧪
uses: ./
with:
command: npm run custom-test
working-directory: examples/v9/custom-command

- name: Show saved file 🖨
run: cat examples/v9/custom-command/results.json

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

start:
# example where instead of forming the default "cypress run ..."
# the user can specify their own command
Expand Down
Loading

0 comments on commit a6333aa

Please sign in to comment.