Skip to content

chore: add CI workflow and vitest tests#2

Merged
B4nan merged 1 commit into
mainfrom
chore/add-ci-and-tests
Mar 12, 2026
Merged

chore: add CI workflow and vitest tests#2
B4nan merged 1 commit into
mainfrom
chore/add-ci-and-tests

Conversation

@B4nan
Copy link
Copy Markdown
Member

@B4nan B4nan commented Mar 12, 2026

Summary

  • Add GitHub Actions CI workflow (tests.yml) running on Node 22 and 24 with npm ci, npm run build, and npm test
  • Add vitest with 18 tests across 2 test files covering all entities, repositories, virtual entities, and server action logic
  • Fix lazy scalar Ref properties (User.password, Article.text) by adding missing .ref() to their EntitySchema definitions, resolving ValidationError: Trying to set ... of type 'string' to Ref<...> during flush

Test plan

  • All 18 tests pass locally (npm test)
  • npm run build (Next.js build) succeeds
  • CI runs green on Node 22 and 24

🤖 Generated with Claude Code

Add GitHub Actions CI workflow running tests on Node 22 and 24.
Add vitest with 18 tests covering all entities (User, Article, Tag,
Comment), repositories (UserRepository, ArticleRepository), the
ArticleListing virtual entity, and server action logic.

Fix lazy scalar Ref properties (User.password, Article.text) by adding
missing .ref() to their EntitySchema definitions, which resolves
validation errors during flush.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@B4nan B4nan merged commit 4b39d7e into main Mar 12, 2026
2 checks passed
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