mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-04-28 06:19:46 +00:00
fix(ci): fix eslint OOM, failing tests, and strengthen pre-commit hook
- eslint.config.mjs: add missing ignores for vscode-extension/, electron/, docs/, app/.next/, clipr/ — ESLint was OOMing because it scanned huge VS Code binary blobs and build artifacts - tests: remove stale ALTER TABLE 'group' statements — column is now part of the base schema in core.ts; tests were failing with SQLITE_ERROR: duplicate column name - .husky/pre-commit: add npm run test:unit to block broken tests from reaching CI
This commit is contained in:
parent
36856b18db
commit
2c1488e65a
4 changed files with 20 additions and 3 deletions
|
|
@ -1,2 +1,3 @@
|
|||
npx lint-staged
|
||||
node scripts/check-docs-sync.mjs
|
||||
npm run test:unit
|
||||
|
|
|
|||
|
|
@ -24,16 +24,34 @@ const eslintConfig = [
|
|||
"react-hooks/rules-of-hooks": "off",
|
||||
},
|
||||
},
|
||||
// Global ignores (open-sse and tests REMOVED — now linted)
|
||||
// Global ignores — keep ESLint scoped to source files only
|
||||
{
|
||||
ignores: [
|
||||
// Next.js build output
|
||||
".next/**",
|
||||
"out/**",
|
||||
"build/**",
|
||||
"next-env.d.ts",
|
||||
// Scripts and binaries
|
||||
"scripts/**",
|
||||
"bin/**",
|
||||
// Dependencies
|
||||
"node_modules/**",
|
||||
// VS Code extension and its large test fixtures
|
||||
"vscode-extension/**",
|
||||
// Electron app
|
||||
"electron/**",
|
||||
// Docs
|
||||
"docs/**",
|
||||
// Open-SSE compiled/bundled output
|
||||
"open-sse/mcp-server/dist/**",
|
||||
// Playwright test output
|
||||
"playwright-report/**",
|
||||
"test-results/**",
|
||||
// Subdirectory .next build output (app/ subdir)
|
||||
"app/.next/**",
|
||||
// CLI package copy directory
|
||||
"clipr/**",
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ test.after(() => {
|
|||
|
||||
test("clearAccountError clears stale provider error metadata after recovery", async () => {
|
||||
await resetStorage();
|
||||
core.getDbInstance().exec('ALTER TABLE provider_connections ADD COLUMN "group" TEXT');
|
||||
|
||||
const created = await providersDb.createProviderConnection({
|
||||
provider: "codex",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ async function resetStorage() {
|
|||
core.resetDbInstance();
|
||||
fs.rmSync(TEST_DATA_DIR, { recursive: true, force: true });
|
||||
fs.mkdirSync(TEST_DATA_DIR, { recursive: true });
|
||||
core.getDbInstance().exec('ALTER TABLE provider_connections ADD COLUMN "group" TEXT');
|
||||
}
|
||||
|
||||
async function seedOpenAIConnection(email) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue