GitLab CI Cache vs Artifacts
In /home/student/repos/storefront/.gitlab-ci.yml the test job fails with dist/ not found, and each job spends three minutes downloading the same npm packages.
build keeps dist/ as an artifact that expires after 1 week, and test receives build's artifacts..npm/ directory whose key is computed from package-lock.json (so it changes whenever the lockfile changes).build uploads the cache: test only pulls it.npm ci uses that cache: npm ci --cache .npm --prefer-offline.Keep the test command as it is.
About this machine
Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.
Part of CI/CD Pipelines in Practice. Next step: Manual Production Deploys in GitLab CI
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.