Skip to content

Commit

Permalink
add retry to cypress github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrajamanickam-coveo committed May 17, 2023
1 parent edb5733 commit 4802c79
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 95 deletions.
16 changes: 9 additions & 7 deletions .github/actions/e2e-atomic-angular/action.yml
Expand Up @@ -12,14 +12,16 @@ runs:
npm i
shell: bash
working-directory: ./packages/samples/angular
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/samples/angular
start: npm run dev
wait-on: 'http://localhost:4200'
install: false
record: false
attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/samples/angular
start: npm run dev
wait-on: 'http://localhost:4200'
install: false
record: false
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
16 changes: 9 additions & 7 deletions .github/actions/e2e-atomic-hosted-page/action.yml
Expand Up @@ -8,14 +8,16 @@ inputs:
runs:
using: composite
steps:
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/atomic-hosted-page
start: npm run dev
wait-on: 'http://localhost:3335'
install: false
record: false
attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/atomic-hosted-page
start: npm run dev
wait-on: 'http://localhost:3335'
install: false
record: false
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
18 changes: 10 additions & 8 deletions .github/actions/e2e-atomic-insight-panel/action.yml
Expand Up @@ -8,12 +8,14 @@ inputs:
runs:
using: composite
steps:
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/atomic
config-file: cypress-insight-panel.config.ts
start: npm run prod
wait-on: 'http://localhost:3333'
install: false
record: false
attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/atomic
config-file: cypress-insight-panel.config.ts
start: npm run prod
wait-on: 'http://localhost:3333'
install: false
record: false
19 changes: 10 additions & 9 deletions .github/actions/e2e-atomic-next/action.yml
Expand Up @@ -8,16 +8,17 @@ inputs:
runs:
using: composite
steps:
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/samples/atomic-next
start: npm run dev
wait-on: 'http://localhost:3000'
install: false
record: false
browser: chrome

attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/samples/atomic-next
start: npm run dev
wait-on: 'http://localhost:3000'
install: false
record: false
browser: chrome
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
22 changes: 12 additions & 10 deletions .github/actions/e2e-atomic-react/action.yml
@@ -1,5 +1,5 @@
name: "Atomic React E2E tests"
description: "Runs Cypress tests for Atomic React"
name: 'Atomic React E2E tests'
description: 'Runs Cypress tests for Atomic React'
inputs:
github-token:
description: The GitHub token for accurately detecting a build vs a re-run build
Expand All @@ -8,16 +8,18 @@ inputs:
runs:
using: composite
steps:
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/samples/atomic-react
start: npm run dev
wait-on: 'http://localhost:3000'
install: false
record: false
attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/samples/atomic-react
start: npm run dev
wait-on: 'http://localhost:3000'
install: false
record: false
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: packages/samples/atomic-react/cypress/screenshots
path: packages/samples/atomic-react/cypress/screenshots
18 changes: 10 additions & 8 deletions .github/actions/e2e-atomic-screenshots/action.yml
Expand Up @@ -8,15 +8,17 @@ inputs:
runs:
using: composite
steps:
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/atomic
config-file: cypress-screenshots.config.ts
start: npm run prod
wait-on: 'http://localhost:3333'
install: false
record: false
attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/atomic
config-file: cypress-screenshots.config.ts
start: npm run prod
wait-on: 'http://localhost:3333'
install: false
record: false
- uses: actions/upload-artifact@v3
if: cancelled() || failure() || success()
with:
Expand Down
24 changes: 13 additions & 11 deletions .github/actions/e2e-atomic/action.yml
@@ -1,5 +1,5 @@
name: "Atomic E2E tests"
description: "Runs Cypress tests for Atomic"
name: 'Atomic E2E tests'
description: 'Runs Cypress tests for Atomic'
inputs:
github-token:
description: The GitHub token for accurately detecting a build vs a re-run build
Expand All @@ -11,19 +11,21 @@ inputs:
runs:
using: composite
steps:
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/atomic
spec: ${{ inputs.spec }}
start: npm run prod
wait-on: 'http://localhost:3333'
install: false
record: false
attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/atomic
spec: ${{ inputs.spec }}
start: npm run prod
wait-on: 'http://localhost:3333'
install: false
record: false
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: packages/atomic/cypress/screenshots
path: packages/atomic/cypress/screenshots
19 changes: 10 additions & 9 deletions .github/actions/e2e-iife/action.yml
Expand Up @@ -8,16 +8,17 @@ inputs:
runs:
using: composite
steps:
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/samples/iife
start: npm run prod
wait-on: 'http://localhost:3000'
install: false
record: false
browser: chrome

attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/samples/iife
start: npm run prod
wait-on: 'http://localhost:3000'
install: false
record: false
browser: chrome
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
26 changes: 14 additions & 12 deletions .github/actions/e2e-quantic/action.yml
@@ -1,5 +1,5 @@
name: "Quantic E2E tests"
description: "Runs Cypress tests for Quantic"
name: 'Quantic E2E tests'
description: 'Runs Cypress tests for Quantic'
inputs:
github-token:
description: The GitHub token for accurately detecting a build vs a re-run build
Expand All @@ -15,18 +15,20 @@ runs:
with:
path: packages/quantic/cypress/plugins/config
key: quantic-cypress-config-${{ github.sha }}
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/quantic
spec: ${{ inputs.spec }}
install: false
record: false
config: reporter=cypress/reporters/detailed-reporter.js
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/quantic
spec: ${{ inputs.spec }}
install: false
record: false
config: reporter=cypress/reporters/detailed-reporter.js
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: packages/quantic/cypress/screenshots
path: packages/quantic/cypress/screenshots
16 changes: 9 additions & 7 deletions .github/actions/e2e-stencil/action.yml
Expand Up @@ -8,14 +8,16 @@ inputs:
runs:
using: composite
steps:
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/samples/stencil
start: npm run dev
wait-on: 'http://localhost:3666'
install: false
record: false
attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/samples/stencil
start: npm run dev
wait-on: 'http://localhost:3666'
install: false
record: false
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
16 changes: 9 additions & 7 deletions .github/actions/e2e-vuejs/action.yml
Expand Up @@ -8,14 +8,16 @@ inputs:
runs:
using: composite
steps:
- uses: cypress-io/github-action@v4
name: Run Cypress
- uses: Wandalen/wretry.action@master
with:
working-directory: ./packages/samples/vuejs
start: npm run dev
wait-on: 'http://localhost:8080'
install: false
record: false
attempt_limit: 3
action: cypress-io/github-action@v4
with:
working-directory: ./packages/samples/vuejs
start: npm run dev
wait-on: 'http://localhost:8080'
install: false
record: false
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down

0 comments on commit 4802c79

Please sign in to comment.