Skip to content

ci(backend): format check, lint, and test pipeline#6

Merged
codebestia merged 7 commits into
mainfrom
dev
May 13, 2026
Merged

ci(backend): format check, lint, and test pipeline#6
codebestia merged 7 commits into
mainfrom
dev

Conversation

@codebestia

Copy link
Copy Markdown
Owner

Summary

  • Added .prettierrc.json at repo root (single-quote, semi, 100 print width, trailing commas)
  • Added eslint.config.js in apps/backend using @eslint/js + typescript-eslint recommended rules
  • Added vitest.config.ts with a global setupFiles entry that sets JWT_SECRET before any module is imported
  • Wrote 11 unit tests across two suites:
    • jwt.test.ts — sign, verify, tampered token, expired token
    • nonce.test.ts — create, consume, single-use, wrong nonce, unknown wallet, expiry (fake timers)
  • Fixed formatting in socketAuth.ts, conversations.ts, messaging.ts to pass Prettier check
  • Added scripts to package.json: test, test:watch, test:coverage, lint, format:check
  • .github/workflows/backend-ci.yml — triggers on push/PR to apps/backend/**, runs three sequential steps:
    1. Format checkpnpm format:check
    2. Lintpnpm lint
    3. Testspnpm test (uses JWT_SECRET repo secret with a CI fallback)

@codebestia codebestia merged commit 3f72a67 into main May 13, 2026
2 checks passed
codebestia added a commit that referenced this pull request Jun 26, 2026
ci(backend): format check, lint, and test pipeline
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