-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
There was a problem hiding this 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
There was a problem hiding this 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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
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