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

mrc-5445 Make e2e tests run in parallel #42

Merged
merged 13 commits into from
Jun 11, 2024
Merged

mrc-5445 Make e2e tests run in parallel #42

merged 13 commits into from
Jun 11, 2024

Conversation

M-Kusumgar
Copy link
Contributor

e2e tests felt slow and considering that we are relying more on them in this project, it would be nice to get on top of this now

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.69%. Comparing base (7bfb1de) to head (5b9efb3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #42   +/-   ##
=======================================
  Coverage   89.69%   89.69%           
=======================================
  Files          33       33           
  Lines        2155     2155           
  Branches      224      224           
=======================================
  Hits         1933     1933           
  Misses        216      216           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@M-Kusumgar M-Kusumgar marked this pull request as ready for review June 5, 2024 15:57
Copy link
Collaborator

@david-mears-2 david-mears-2 left a comment

Choose a reason for hiding this comment

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

Thank you for doing this!

Reference:
https://playwright.dev/docs/test-sharding

Copy link
Contributor

@EmmaLRussell EmmaLRussell left a comment

Choose a reason for hiding this comment

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

Great stuff! Just wondering if it would be possible to tersify it a little?

Could this be tidied up a little by having 6 jobs in a single workflow rather than 6 separate workflows? Jobs are executed on separate runners and in parallel by default, aren't they, so wouldn't that get the parallelism we want? That would mean we'd just need one yml file and wouldn't have the repetition of on..?

package.json Outdated
@@ -14,7 +14,13 @@
"lint": "eslint . --ignore-path .gitignore",
"test:unit": "vitest",
"test:coverage": "vitest --coverage",
"test:e2e": "playwright test"
"test:e2e": "playwright test",
"test:e2e:1": "playwright test --shard=1/6",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you actually need these? You can pass command line args through to the npm scripts, so couldn't you just call
npm run test:e2e -- --shard=${{ inputs.shard }}/6 from the action?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, that is much better! also done it in one workflow file!

Copy link
Contributor

@EmmaLRussell EmmaLRussell left a comment

Choose a reason for hiding this comment

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

Nice!

@M-Kusumgar M-Kusumgar merged commit 5a34a8a into main Jun 11, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants