ci: add GitHub Actions workflow for lint, typecheck, and tests#3836
Open
KuaaMU wants to merge 1 commit intodailydotdev:mainfrom
Open
ci: add GitHub Actions workflow for lint, typecheck, and tests#3836KuaaMU wants to merge 1 commit intodailydotdev:mainfrom
KuaaMU wants to merge 1 commit intodailydotdev:mainfrom
Conversation
Add a CI workflow that runs on pull requests and pushes to main: - lint: ESLint with max 0 warnings - typecheck: TypeScript compilation via tsc - test: Jest test suite with PostgreSQL 16 and Redis 7 service containers This ensures code quality checks run automatically on every PR, preventing regressions from being merged without validation.
7fe2e53 to
b11b2c3
Compare
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.
Summary
This PR adds a GitHub Actions CI workflow that runs on every pull request and push to
main, ensuring code quality checks happen automatically.Jobs
pnpm run lint(ESLint with--max-warnings 0)pnpm run build(TypeScript compilation viatsc)pnpm run test(Jest with PostgreSQL 16 + Redis 7 service containers)Why this matters
The project has excellent local tooling — ESLint, Prettier, TypeScript strict mode, and 303+ tests — but none of these run automatically in CI. This means PRs can merge without passing lint, type checks, or tests.
Design decisions
api_testdatabase used by testspackageManagerfrompackage.jsonautomatically (no hardcoded version)Environment variables
The workflow sets only the database/Redis connection variables needed for tests. Secrets and external service URLs are not required since tests mock external dependencies.