Skip to content

Commit

Permalink
Cypress parallel (#6273)
Browse files Browse the repository at this point in the history
* Run cypress tests parallely

* added group property

* added cypress-split to run cypress tests in parallel in github actions

* remove cypress split

* added envs to enhance cypress dashboard

* increase parallel containers

* remove group

* remove cypress label in action


Co-authored-by: Khavin Shankar <[email protected]>
  • Loading branch information
mathew-alex and khavinshankar authored Sep 14, 2023
1 parent c5f3b79 commit d790af0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 217 deletions.
35 changes: 7 additions & 28 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
permissions: write-all
if: github.repository == 'coronasafe/care_fe'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
containers: [1,2,3,4,5,6,7,8]
steps:
- name: Checkout 📥
uses: actions/checkout@v3
Expand Down Expand Up @@ -60,39 +64,14 @@ jobs:
wait-on-timeout: 300
browser: chrome
record: true
parallel: true
env:
CARE_API: http://localhost:9000
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --max_old_space_size=4096

- name: Remove cypress passed label on failure 🏷️
uses: actions-ecosystem/action-remove-labels@v1
if: failure()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: cypress passed

- name: Add cypress passed label on success 🏷️
uses: actions-ecosystem/action-add-labels@v1
if: success()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: cypress passed

- name: Remove cypress failed label on success 🏷️
uses: actions-ecosystem/action-remove-labels@v1
if: success()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: cypress failed

- name: Add cypress failed label on failure 🏷️
uses: actions-ecosystem/action-add-labels@v1
if: failure()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: cypress failed
COMMIT_INFO_MESSAGE: ${{github.event.pull_request.title}}
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}

- name: Upload cypress screenshots on failure 📸
uses: actions/upload-artifact@v3
Expand Down
1 change: 0 additions & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default defineConfig({
return null;
},
});

return config;
},
baseUrl: "http://localhost:4000",
Expand Down
Loading

0 comments on commit d790af0

Please sign in to comment.