The Scenario
A startup team is pushing broken code to the `main` branch because developers forget to run tests locally. They need a Continuous Integration (CI) pipeline that automatically checks every Pull Request.
The Brief
Write a GitHub Actions workflow YAML file for a Node.js project. It should trigger on Pull Requests to `main`. It must install dependencies, run a linter, and run the test suite. If any step fails, the workflow must fail.
Deliverables
- The complete `.yml` workflow file
- An explanation of the difference between `npm install` and `npm ci` in a pipeline
Submission Guidance
Ensure you are caching Node modules to speed up the workflow execution time. Speed matters in CI.
Submit Your Work
Your submission is graded against the rubric on the right. If you pass, you get a public Badge URL you can share on LinkedIn. There is no draft save, so work offline first and paste your finished response here.