test(frontend): add CI coverage for tests and migrations - #605
Merged
junhoyeo merged 1 commit intoMay 27, 2026
Merged
Conversation
Validation
* Validation tier: Tier 4 - CI/test tooling, because this adds a focused frontend CI workflow plus migration replay verification without changing runtime behavior.
* bun install --frozen-lockfile: PASS
* bun run --cwd packages/frontend test: PASS, 29 files and 251 tests passed.
* DATABASE_URL=postgres://postgres:postgres@localhost:<docker-port>/tokscale_ci NODE_ENV=test bun run --cwd packages/frontend test:migrations: PASS against postgres:16, migrations applied and schema smoke checks passed.
* ruby -e 'require "yaml"; YAML.load_file(".github/workflows/frontend_ci.yml"); puts "yaml ok"': PASS
* perl -ne 'print if /[\x{0400}-\x{04FF}]/' .github/workflows/frontend_ci.yml packages/frontend/package.json packages/frontend/scripts/check-migrations.ts: PASS, no output.
* git diff --check: PASS
* git diff --cached --check: PASS
* Ledger: not applicable - not required for selected validation tier/change family.
* Version: not applicable - not required for selected validation tier/change family.
* Non-gating observation: bun run --cwd packages/frontend lint currently fails on pre-existing unrelated app lint errors outside this diff; the new workflow does not introduce lint as a frontend gate.
* Not run: actionlint - not installed locally.
Rollback
* git revert HEAD
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
|
@IvGolovach this has been merged to v3.0.0: https://github.com/junhoyeo/tokscale/releases/tag/v3.0.0 thanks for the contribution! |
leecoder
pushed a commit
to leecoder/tokscale
that referenced
this pull request
May 29, 2026
Validation
* Validation tier: Tier 4 - CI/test tooling, because this adds a focused frontend CI workflow plus migration replay verification without changing runtime behavior.
* bun install --frozen-lockfile: PASS
* bun run --cwd packages/frontend test: PASS, 29 files and 251 tests passed.
* DATABASE_URL=postgres://postgres:postgres@localhost:<docker-port>/tokscale_ci NODE_ENV=test bun run --cwd packages/frontend test:migrations: PASS against postgres:16, migrations applied and schema smoke checks passed.
* ruby -e 'require "yaml"; YAML.load_file(".github/workflows/frontend_ci.yml"); puts "yaml ok"': PASS
* perl -ne 'print if /[\x{0400}-\x{04FF}]/' .github/workflows/frontend_ci.yml packages/frontend/package.json packages/frontend/scripts/check-migrations.ts: PASS, no output.
* git diff --check: PASS
* git diff --cached --check: PASS
* Ledger: not applicable - not required for selected validation tier/change family.
* Version: not applicable - not required for selected validation tier/change family.
* Non-gating observation: bun run --cwd packages/frontend lint currently fails on pre-existing unrelated app lint errors outside this diff; the new workflow does not introduce lint as a frontend gate.
* Not run: actionlint - not installed locally.
Rollback
* git revert HEAD
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 focused frontend CI workflow for the existing Vitest suite and a real Postgres migration replay check for the frontend database schema.
Why
The frontend already has meaningful tests for API routes, leaderboard behavior, submit validation, embeds, tokens, groups, and username lookup, but those tests were not exposed as a dedicated CI signal. The migration SQL also carried production-sensitive changes, while most existing checks mocked database behavior or inspected migration text instead of replaying the migration history against Postgres.
Diff Scope
packages/frontendtest scripts for Vitest and migration replay..github/workflows/frontend_ci.ymlwith separate jobs for frontend Vitest andpostgres:16migration replay.packages/frontend/scripts/check-migrations.tsto verify migration journal application, required tables/columns/indexes/extensions, removed-column cleanup, and representative insert compatibility after migrations.Branch Integrity
junhoyeo/tokscale:main8e73312f05f603d5184d36059e4ce2604322d492IvGolovach:codex/frontend-ci-db-migration-replay0d3fbaa6a9910f837ef38e467823e7cb89f48ccd0 behind / 1 aheadCommit Integrity
0d3fbaa6a9910f837ef38e467823e7cb89f48ccd test(frontend): add CI coverage for tests and migrationsDiff Hygiene
git diff --check origin/main...HEAD: PASS, no outputValidation
Validation mode: Mode 4 — CI/test tooling.
bun install --frozen-lockfile: PASSbun run --cwd packages/frontend test: PASS, 29 files / 251 testsDATABASE_URL=postgres://postgres:postgres@localhost:<docker-port>/tokscale_ci NODE_ENV=test bun run --cwd packages/frontend test:migrations: PASS against temporarypostgres:16ruby -e 'require "yaml"; YAML.load_file(".github/workflows/frontend_ci.yml"); puts "yaml ok"': PASSgit diff --check origin/main...HEAD: PASSNot used as proof:
actionlintwas unavailable locally. Full frontend lint currently reports unrelated existing app lint errors outside this diff, so this workflow intentionally starts with tests and migration replay rather than adding a new lint gate.CI Context
Pending — required remote checks and the new frontend workflow will run after the PR is opened.
Runtime Safety
Not applicable — no application runtime path changed. This PR adds CI/test coverage and migration verification only.
Migration Safety
No new migration is introduced. The new replay job applies the existing migration journal to a fresh
postgres:16database and verifies critical schema facts after replay.Rollback Plan
Rollback: revert this PR.
DB downgrade: not applicable.
Data repair: not applicable.
Operational caveats: reverting would remove the frontend Vitest and migration replay CI signals.
Known Residual Risks
The new workflow needs GitHub Actions validation on the opened PR. The migration replay check is intentionally schema-smoke focused rather than an exhaustive application integration test.