Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
add cypress split
Browse files Browse the repository at this point in the history
  • Loading branch information
nehemiah-abuga committed Jul 19, 2023
1 parent 7c01fc5 commit b65a358
Show file tree
Hide file tree
Showing 4 changed files with 1,814 additions and 52 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
install:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
containers: [1, 2, 3]

steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -41,7 +46,11 @@ jobs:
uses: cypress-io/github-action@v5
with:
command: npm run cy:run:cross-browser
parallel: true
start: npm run federalist
env:
SPLIT: ${{ strategy.job-total }}
SPLIT_INDEX: ${{ strategy.job-index }}

- uses: actions/upload-artifact@v3
if: always ()
Expand Down
5 changes: 5 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { defineConfig } = require("cypress")
const cypressSplit = require('cypress-split')

module.exports = defineConfig({
viewportHeight: 1080,
Expand All @@ -13,5 +14,9 @@ module.exports = defineConfig({
specPattern: "cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
testIsolation: false,
supportFile: false,
setupNodeEvents(on, config) {
cypressSplit(on, config)
return config
},
},
})
Loading

0 comments on commit b65a358

Please sign in to comment.