ONEARMY / community-platform

A platform to build useful communities that aim to tackle global problems
https://platform.onearmy.earth
MIT License
1.14k stars 386 forks source link

[feature] Cypress CircleCI- add cache browser on test_e2e jobs #3683

Closed tuliobluz closed 2 weeks ago

tuliobluz commented 3 months ago

Is your feature request related to a problem? Please describe. It is not associated with a problem, however, every time that e2e-chrome-(1,2,3,4) runs it has to download the browser as you can see here. The idea is to cache the browser.

The download will be not necessary anymore as it will be cached. Saving time and resources as you can see down below:

As an example, it can take more or less: Time total: 168 seconds (42 seconds to finish the download step and e2e-chrome runs 4 times as it is parallel)

Describe the solution you'd like

I created this https://github.com/ONEARMY/community-platform/pull/3682 to try to solve it.

Describe alternatives you've considered I am not sure it has others.

tuliobluz commented 3 months ago

Make sure to be able to update the browser to the new versions when it is cached.

benfurber commented 2 months ago

Are you still looking at this @tuliobluz ?

tuliobluz commented 2 months ago

@benfurber I am going to look at this now.

tuliobluz commented 2 months ago

Every time that setup_repo is used on the pipeline, it installs cypress and takes about 40 seconds more to install.

Jobs that run it:

  1. lint
  2. test_security_rules
  3. setup
  4. test_functions
  5. test_functions_upload_coverage
  6. test_unit
  7. test_circular_dependency
  8. build
  9. storybook
  10. deploy
  11. test_e2e
  12. chromatic

I am trying to find a way to cache the cypress. It seems that orbs is the best approach, but we have to find out its impact.

For this issue I opened the ticket https://github.com/ONEARMY/community-platform/issues/3793