Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Split cypress tests locally #5925

Merged
merged 6 commits into from
Oct 7, 2024
Merged

Conversation

sidharthv96
Copy link
Member

📑 Summary

Avoids the dependency on the cypress server, so tests from forks can also run in parallel.

📏 Design Decisions

Describe the way your implementation works or what design decisions you made if applicable.

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added necessary unit/e2e tests.
  • 📓 have added documentation. Make sure MERMAID_RELEASE_VERSION is used for all new features.
  • 🦋 If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Copy link

changeset-bot bot commented Oct 3, 2024

⚠️ No Changeset found

Latest commit: 9cc309b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Oct 3, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 9cc309b
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/6703cb100d0800000906e230
😎 Deploy Preview https://deploy-preview-5925--mermaid-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

pkg-pr-new bot commented Oct 3, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/mermaid-js/mermaid@5925
pnpm add https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/layout-elk@5925
pnpm add https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/mermaid-zenuml@5925
pnpm add https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/parser@5925

commit: 9cc309b

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 4.67%. Comparing base (ddf18dd) to head (9cc309b).
Report is 7 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #5925   +/-   ##
=======================================
  Coverage     4.67%   4.67%           
=======================================
  Files          372     372           
  Lines        51669   51669           
  Branches       611     611           
=======================================
  Hits          2414    2414           
  Misses       49255   49255           
Flag Coverage Δ
unit 4.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link

argos-ci bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 📭 Waiting for screenshots - Oct 7, 2024, 11:56 AM

@sidharthv96 sidharthv96 requested a review from aloisklink October 3, 2024 21:08
Copy link
Member

@aloisklink aloisklink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

It also works locally, I tested this by running:

concurrently \
  'SPLIT=4 SPLIT_INDEX=0 SPLIT_FILE=cypress/timings.json cypress run' \
  'SPLIT=4 SPLIT_INDEX=1 SPLIT_FILE=cypress/timings.json cypress run' \
  'SPLIT=4 SPLIT_INDEX=2 SPLIT_FILE=cypress/timings.json cypress run' \
  'SPLIT=4 SPLIT_INDEX=3 SPLIT_FILE=cypress/timings.json cypress run'

And I managed to cut down the E2E test time from ~20 minutes to ~7 minutes.

.github/workflows/e2e-timings.yml Outdated Show resolved Hide resolved
.github/workflows/e2e-timings.yml Outdated Show resolved Hide resolved
@sidharthv96 sidharthv96 merged commit e55880a into develop Oct 7, 2024
16 of 17 checks passed
@sidharthv96 sidharthv96 deleted the sidv/parallelCypress branch October 7, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants