ci(e2e): use playwright shard feature#5624
Merged
Conversation
Изменения в `reusable_workflow_test_e2e.yml`: - Используем `strategy.matrix` и `--shard` для распараллеливания джоб. - Объединяем отчёты через `npx playwright merge-reports` см. https://playwright.dev/docs/test-sharding#github-actions-example - Пробуем использовать `@actions/cache` для кеширования `playwright/.cache`. - Удалили загрузку артефакта `e2e-output` за ненадобностью. - Удалили `TODO Playwright реализовать покрытие`, т.к. покрытие мы уже собираем jest'ом. Изменения в `playwright-ct.config.ts`: - Так как в CI мы распараллеливаем тесты через `--shard`, то ставим `workers` на 1. - Пробуем выставить `maxFailures: 10` в CI, чтобы в лишний раз не гонять все тесты, если 10 из них упали. - Используем для CI blob для отчёта, чтобы потом можно было смержить.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e373ae9:
|
Contributor
size-limit report 📦
|
Contributor
👀 Docs deployedCommit e373ae9 |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #5624 +/- ##
=======================================
Coverage 81.83% 81.83%
=======================================
Files 289 289
Lines 9655 9655
Branches 3073 3073
=======================================
Hits 7901 7901
Misses 1754 1754
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
SevereCloud
reviewed
Aug 14, 2023
Co-authored-by: Daniil Suvorov <severecloud@gmail.com>
Contributor
e2e tests |
40a7aa9 to
0cd2815
Compare
SevereCloud
previously approved these changes
Aug 15, 2023
mendrew
previously approved these changes
Aug 15, 2023
Contributor
mendrew
left a comment
There was a problem hiding this comment.
Очень круто, особенно результаты! 🎉 🎉 🎉
Только один вопрос про изменеия вretention-days
SevereCloud
approved these changes
Aug 15, 2023
inomdzhon
added a commit
that referenced
this pull request
Aug 21, 2023
test_e2e_prepare_report должен выполняться всегда после test_e2e. В #5624 условие if: always() было выставлено не там где надо.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Изменения в
reusable_workflow_test_e2e.yml:strategy.matrixи--shardдля распараллеливания джоб.npx playwright merge-reportsсм. https://playwright.dev/docs/test-sharding#github-actions-examplee2e-outputза ненадобностью.TODO Playwright реализовать покрытие, т.к. покрытие мы уже собираем jest'ом.Изменения в
playwright-ct.config.ts:--shard, то ставимworkersна 1.maxFailures: 10в CI, чтобы в лишний раз не гонять все тесты, если 10 из них упали.Результат
Стало в ~3.5 раза быстрее 🎉
До изменений
После изменений
Нюанс про кэширование сборки перед запуском теста
Пробовал использовать
@actions/cacheдля кешированияplaywright/.cache, но из-за того, что все тесты идут практически параллельно, этот кэш не успевает создаться.В будущем можно попробовать создать предварительный шаг, в котором будет создан
playwright/.cacheи закэширован через@actions/cache. Сейчас у Playwright нет команды, которая позволила бы только собрать сборку для созданияplaywright/.cache.reusable_workflow_test_e2e.yml#5306