0Pricing
JavaScript Academy · Lesson

CI basics — run lint/test on every push

Set up a tiny CI: install with npm ci, run lint and tests, and keep a fast feedback loop.

Why CI for beginners?

Goal: Run checks on every push.

  • Install with npm ci
  • Run lint and test scripts
  • Fast feedback, simple logs
  • Keep pipeline tiny for beginners
CI basics — run lint/test on every push — illustration 1

Scripts CI will run

Create tiny lint and test scripts in package.json so CI can run them.

// Minimal scripts your CI will call
const pkgScripts = {
  lint: "eslint .",
  test: "node test-runner.js"
};

console.log("scripts:", Object.keys(pkgScripts));
console.log("lint ->", pkgScripts.lint);
console.log("test ->", pkgScripts.test);
CI basics — run lint/test on every push — illustration 2

All lessons in this course

  1. Test mindset — tiny assertions, AAA, red→green→refactor
  2. Linting with ESLint; Prettier formatting
  3. CI basics — run lint/test on every push
← Back to JavaScript Academy