KielerGames/ringofsnakes

Watch client bundle size

Closed this issue · 1 comments

We should watch the build size (at least for the client) to make sure it does not accidentally increase. I think this could work: https://github.com/adobe/sizewatcher#github-actions

We can use https://github.com/marketplace/actions/bundle-size-diff for this. However, this requires access to the latest client bundle stats from the main branch. For this we can probably use https://github.com/benday-inc/download-latest-artifact or even use the (API)[https://docs.github.com/en/rest/actions/artifacts#get-an-artifact] directly.

A first step would be to get this working at all. But while we are at it and increase the number of third party actions we should restrict the permissions of those.

What has been done so far on the feature-branch is

  • added webpack-bundle-analyzer (this is required for actions/bundle-size-diff)
  • update client workflow (incomplete)