pixiebrix-extension
pixiebrix-extension copied to clipboard
Refactor Playwright build and auth steps into separate CI jobs so the shards do not repeat work
Motivation
- We introduced sharding to dramatically reduce the Playwright runtime but each shard has to run authentication
- Running the setup authentication once in a separate step that the Playwright shards inherit would further reduce the time needed to run tests
- Running the build once before all also would cut a lot of wasted time on each shard.
Acceptance Criteria
- [ ] The GitHub Actions
end-to-end-testsworkflow first runs a separate build job, which is used in all subsequent playwright test runs. - [ ] The setup projects (i.e.
chromeSetupandedgeSetup) run in a separate job before all other shards.- [ ] Uploads the resulting profiles to Github artifacts, which are then pulled in each shard job.
- [ ] The final report should still include the setup tests status and we should still be able to view the playwright report and traces for it.
More details
https://github.com/pixiebrix/pixiebrix-extension/blob/68615326daa77c0a2e8cb885773ea1dc72edac92/.github/workflows/end-to-end-tests.yml
Use the --no-deps and --project cli options
https://playwright.dev/docs/test-cli