We use GitLab CI for our project. Our build stage is currently taking close to 13
minutes to complete because node_modules are always
removed, downloaded & npm installed
again. Also the node_modules is quite big (close to 200 MB). We've already set the cache in our .gitlab-ci.yaml
file but that doesn't seem to work. Here's how we've set it to :
cache:
key: $CI_PROJECT_PATH_SLUG
untracked: true
paths:
- project/node_modules/
policy: pull
If we set it to cache on a project level why isn't it performing as intended?
Other solutions posted here didn't work for us. All ideas for improving the cache mechanism & reducing build time are welcome.