diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 821cc55b..e308b2e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,12 @@ jobs: - name: Run Linter run: npm run lint + # - name: Verify Supabase Types + # run: | + # npx supabase start + # npm run generate-types + # git diff --exit-code src/integrations/supabase/types.ts || (echo "Supabase types are outdated. Please run 'npm run generate-types' locally and commit." && exit 1) + - name: Run Tests with Coverage run: npx vitest run --coverage env: diff --git a/.gitignore b/.gitignore index 356992b0..4e2c3ace 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ dist/ .env playwright-report/ test-results/ +gsoc-2026-issues/ \ No newline at end of file diff --git a/package.json b/package.json index 46cf5fcc..303aa5dc 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "preview": "vite preview", "test": "vitest run", "test:watch": "vitest", - "typecheck": "tsc -p tsconfig.app.json --noEmit" + "typecheck": "tsc -p tsconfig.app.json --noEmit", + "generate-types": "supabase gen types typescript --local > src/integrations/supabase/types.ts" }, "dependencies": { "@hookform/resolvers": "^3.10.0", diff --git a/src/integrations/supabase/types.ts b/src/integrations/supabase/types.ts index e69de29b..a2c7b37a 100644 --- a/src/integrations/supabase/types.ts +++ b/src/integrations/supabase/types.ts @@ -0,0 +1,9 @@ +export type Json = + | string + | number + | boolean + | null + | { [key: string]: Json | undefined } + | Json[] + +export type Database = any; diff --git a/vitest.config.ts b/vitest.config.ts index afaa6b44..0bbb2cba 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -5,6 +5,7 @@ import path from "path"; export default defineConfig({ plugins: [react()], test: { + testTimeout: 10000, coverage: { provider: "v8", reporter: ["text", "json", "html"],