Skip to content

chore: update windows executor #744

chore: update windows executor

chore: update windows executor #744

Workflow file for this run

# Note: make sure to use the same version of cypress-io/github-action
# in all jobs, otherwise the last version wins I believe
name: Using Cypress GH Action
on: push
jobs:
single-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cypress run
uses: cypress-io/github-action@v6
timeout-minutes: 10
with:
build: npm run build
start: npm start
parallel-runs:
name: Parallel 4x
runs-on: ubuntu-22.04
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving the Cypress Cloud dashboard hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run 4 copies of the current job in parallel
# the actual items in the array do not matter
# we just need to "force" GitHub CI to create 4 jobs
machines: [1, 2, 3, 4]
steps:
- name: Checkout
uses: actions/checkout@v3
# because of "record" and "parallel" parameters
# these containers will load balance all found tests among themselves
- name: run tests
uses: cypress-io/github-action@v6
timeout-minutes: 5
with:
record: true
parallel: true
group: GH Action parallel
start: npm start
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.dashboardRecordKey }}
parallel-runs-across-platforms:
name: every OS
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving the Cypress Cloud dashboard hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run 2 copies of the current job in parallel
# and they will load balance all specs
os: ['ubuntu-22.04', 'windows-latest', 'macos-latest']
machines: [1, 2]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
# because of "record" and "parallel" parameters
# these containers will load balance all found tests among themselves
- name: run tests
uses: cypress-io/github-action@v6
timeout-minutes: 10
with:
record: true
parallel: true
group: Parallel 2x on ${{ matrix.os }}
# on Mac and Linux we can use "npm start"
start: npm start
# but for this particular project on Windows we need a different start command
start-windows: npm run start
env:
# pass the Cypress Cloud (dashboard) record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.dashboardRecordKey }}