chore: add CI pipeline with lint, build and test - #9
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a minimal CI pipeline that runs on every push to
mainand on every pull request targetingmain:npm ci— install with locked versionsnpm run lint— ESLint + Prettier rules acrosssrc/andtest/npm run build— NestJS build via SWC, followed bytsc-aliasto rewrite@/pathsnpm 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
mainactually compiles and passes its tests — not always a given in portfolio repos.Approach
Three atomic commits:
chore: add lint script with eslint and prettier— ESLint flat config (eslint.config.mjs, the v9+ format), Prettier rules,lint/lint:fix/formatscripts. Prettier reformatted 12 existing files (trailing commas, quotes); all tests still green afterward.chore: add GitHub Actions CI workflow—.github/workflows/ci.ymlrunning on Node 20 with npm cache enableddocs: add CI status badge to READMEFollow-up
After merging, enable branch protection on
mainrequiring the CI check to pass before merge can happen. This makes the pipeline more than decorative — it actually gates the codebase.