umaar / learn-browser-testing

Repository for my upcoming course & workshop
https://learnbrowsertesting.com/
115 stars 8 forks source link

ci: cache NPM caching dir instead of node_modules #11

Closed mxschmitt closed 4 years ago

mxschmitt commented 4 years ago

Hi Umar,

related to that (https://github.com/microsoft/playwright/issues/3712) issue I followed up with adjusting your caching strategy with GitHub Actions.

I updated the caching action to v2 and cache instead of node_modules the NPM cache directory which is recommend see here. Caching the node_modules folder can lead to the behaviour which you've experienced that you need to install Cypress or Playwright manually again with npm install.

Also I switched to npm ci instead of npm install which is optimised to run on bots. This will strictly use the package-lock.json and always install the pinned version. (Test run). Also using now pull request triggers too so external contributors will trigger the bots.

The failing bots seem unrelated.

umaar commented 4 years ago

Max! That was seriously helpful thank you! There were a lot of github action files and I really appreciate you going through each one, thank you.