kiesraad / abacus

Abacus, software voor verkiezingsuitslagen en zetelverdeling
https://kiesraad-abacus.pages.dev
European Union Public License 1.2
19 stars 6 forks source link

Speed up dom-to-database tests #363

Open praseodym opened 1 month ago

praseodym commented 1 month ago

Due to the fixture to reset the backend between every run (#327), our tests got a lot slower. We can work around this by sharding our tests. We could choose to shard by browser, or use the integrated Playwright sharding functionality.

We can shard by using multiple GitHub Actions runners (e.g. using a matrix strategy) or maybe even by running multiple shards in a single runner (but with different API endpoints).

Playwright lets you install a specific browser, .e.g npx playwright install webkit, so we could choose to cache only the node modules, and let each browser-specific runner install the browser they need.

The best way to experiment with GitHub Actions is to fork the repository first, and then try out changes in the forked repository.

jschuurk-kr commented 1 day ago

Working on it in this fork: https://github.com/jschuurk-kr/abacus/blob/main/.github/workflows/build-lint-test.yml