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

ci: Add viewable Matrix test Playwright reports #1169

Merged
merged 74 commits into from
Apr 22, 2024
Merged

Conversation

backspace
Copy link
Contributor

@backspace backspace commented Apr 15, 2024

When Matrix tests fail in CI we don’t get much visibility into why. This publishes the Playwright report with traces to S3 so it can be easily inspected. Here is an example report with a trace on a timed-out test.

The publishing is adapted from @adrian-maciuc’s article Publish your playwright reports to github pages, though it now publishes to S3.

I replaced the tag-based grouping of tests for paralellisation in CI with the built-in sharding which removes the need for snapshots to be duplicated for each group. I experimented with different shard counts:

Shard count 2 4 6 10
Job run times boxel@06c7f2a 2024-04-18 10-44-21 boxel@7b0ec08 2024-04-18 10-32-52 boxel@f434e09 2024-04-18 10-33-08 boxel@abad8ac 2024-04-18 10-33-24
Slowest run time 13m 7s 9m 26s 7m 28s 7m 9s

One repetition isn’t a thorough experiment but I settled on six shards as it wasn’t that much slower than ten and the latter seemed excessive.

After all the shard jobs complete a job runs that merges the reports and publishes them. Thanks to @marshmn on the Playwright Discord for pointing out that an old Playwright version was causing problems with the merge.

The link to the Playwright report is appended in a status:

boxel 2024-04-19 10-39-34

@backspace backspace added the bug Something isn't working label Apr 15, 2024
@backspace backspace self-assigned this Apr 15, 2024
Copy link

github-actions bot commented Apr 16, 2024

Test Results

589 tests  ±0   585 ✔️ ±0   8m 34s ⏱️ -1s
    1 suites ±0       4 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit eb5d892. ± Comparison against base commit e606e2d.

♻️ This comment has been updated with latest results.

@backspace backspace marked this pull request as ready for review April 19, 2024 17:06
@backspace backspace requested a review from a team April 19, 2024 17:06
Copy link
Contributor

@habdelra habdelra left a comment

Choose a reason for hiding this comment

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

This is so nice!

@backspace backspace merged commit 0fe906c into main Apr 22, 2024
27 checks passed
@delete-merged-branch delete-merged-branch bot deleted the matrix/flaky-cs-6640 branch April 22, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants