Skip to content

chore: add CI pipeline with lint, build and test - #9

Merged
lmoraesdev merged 4 commits into
mainfrom
chore/github-actions
May 15, 2026
Merged

chore: add CI pipeline with lint, build and test#9
lmoraesdev merged 4 commits into
mainfrom
chore/github-actions

Conversation

@lmoraesdev

Copy link
Copy Markdown
Owner

What

Adds a minimal CI pipeline that runs on every push to main and on every pull request targeting main:

  1. npm ci — install with locked versions
  2. npm run lint — ESLint + Prettier rules across src/ and test/
  3. npm run build — NestJS build via SWC, followed by tsc-alias to rewrite @/ paths
  4. npm test — full Vitest suite (unit + e2e)

Also adds ESLint and Prettier to the project, configured for TypeScript + NestJS.

Why

Before the next features land (structured logging, observability), the project needs a safety net that catches regressions automatically. A green CI badge on the README also signals to anyone reading the repo that the code on main actually compiles and passes its tests — not always a given in portfolio repos.

Approach

Three atomic commits:

  1. chore: add lint script with eslint and prettier — ESLint flat config (eslint.config.mjs, the v9+ format), Prettier rules, lint/lint:fix/format scripts. Prettier reformatted 12 existing files (trailing commas, quotes); all tests still green afterward.
  2. chore: add GitHub Actions CI workflow.github/workflows/ci.yml running on Node 20 with npm cache enabled
  3. docs: add CI status badge to README

Follow-up

After merging, enable branch protection on main requiring the CI check to pass before merge can happen. This makes the pipeline more than decorative — it actually gates the codebase.

@lmoraesdev
lmoraesdev merged commit 165ce69 into main May 15, 2026
1 check passed
@lmoraesdev
lmoraesdev deleted the chore/github-actions branch May 15, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant