Files
supabase/apps/docs/turbo.jsonc
Raúl Barroso 01958e520f tests: add regression test for skills list (#47819)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Adds regression tests for something we noticed today. AI skills weren't
being loaded on https://supabase.com/docs/guides/ai-tools/ai-skills, so
while we fixed it, we wanted to make sure we could identify this faster.

## What is the current behavior?

Less tests. AI skills loading and not 

## What is the new behavior?

Two tests, no new workflows — both ride existing CI:

- **Unit test** (`AiSkills.utils.test.ts`) mocks GitHub, checks the
parsing/shaping logic (dir filtering, frontmatter, install command,
sorting, empty→fallback). Runs on every PR.
- **Smoke test** (`AiSkillsIndex.smoke.test.ts`) hits the live page and
asserts the skills table actually rendered. Runs in the daily docs smoke
job, and can be pointed at any environment via `DOCS_SMOKE_URL`.

Small supporting change: `getAiSkillsImpl` is now exported so the unit
test can call it directly.

## Additional Context

- Fixes
https://linear.app/supabase/issue/AI-915/skills-docs-page-fails-to-load-available-skills

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Added coverage for AI Skills loading, including directory filtering,
metadata parsing, install command generation, fallback descriptions, and
error handling.
* Added a smoke test confirming the AI Skills documentation page loads
successfully and displays install commands.
* **Refactor**
* Made AI Skills loading functionality accessible for direct testing
while preserving existing behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-29 17:19:50 +00:00

80 lines
2.7 KiB
JSON

{
"$schema": "./../../node_modules/turbo/schema.json",
"extends": ["//"],
"tasks": {
"codegen:examples": {
"inputs": ["../../examples/**"],
"outputs": ["examples/**"],
},
"codegen:references": {
"inputs": ["spec/**"],
"outputs": ["features/docs/generated/**"],
},
// Generates the guide/reference .md files and manifest.json under public/markdown/.
// Declaring outputs lets Turbo restore these artifacts on a cache hit; without it a
// cached run would skip the script and leave the generated markdown missing for `next build`.
"build:markdown": {
"outputs": ["public/markdown/**", "public/markdown/manifest.json"],
},
"test": {
// Lets the smoke tests target a preview deploy or localhost instead of production.
"env": ["DOCS_SMOKE_URL"],
},
"build": {
"dependsOn": ["^build", "codegen:examples", "codegen:references", "build:markdown"],
"env": [
"ANALYZE",
"NEXT_PUBLIC_SUPABASE_URL",
"NEXT_PUBLIC_SUPABASE_ANON_KEY",
"NEXT_PUBLIC_MISC_URL",
"NEXT_PUBLIC_MISC_ANON_KEY",
"NEXT_PUBLIC_MARKETPLACE_API_URL",
"NEXT_PUBLIC_MARKETPLACE_PUBLISHABLE_KEY",
"NODE_ENV",
"NEXT_PUBLIC_API_URL",
"NEXT_PUBLIC_BASE_PATH",
"NEXT_PUBLIC_SITE_URL",
"NEXT_PUBLIC_DEV_AUTH_PAGE",
"NEXT_PUBLIC_IS_PLATFORM",
"NEXT_PUBLIC_SENTRY_DSN",
"NEXT_PUBLIC_VERCEL_ENV",
"NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA",
"VERCEL",
"VERCEL_ENV",
"VERCEL_GIT_COMMIT_SHA",
"VERCEL_URL",
// These envs are used in the packages
"NEXT_PUBLIC_STORAGE_KEY",
"NEXT_PUBLIC_AUTH_DEBUG_KEY",
"NEXT_PUBLIC_AUTH_PERSISTED_KEY",
"NEXT_PUBLIC_AUTH_NAVIGATOR_LOCK_KEY",
"NEXT_PUBLIC_AUTH_DETECT_SESSION_IN_URL",
"NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID",
"NEXT_PUBLIC_GOTRUE_URL",
"NEXT_PUBLIC_SUPABASE_ANON_KEY",
"NEXT_PUBLIC_MCP_URL",
// These envs are technically passthrough env vars because they're only used on the server side of Nextjs
"ASSET_CDN_S3_ENDPOINT",
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY",
"CI",
"DOCS_GITHUB_APP_ID",
"DOCS_GITHUB_APP_INSTALLATION_ID",
"DOCS_GITHUB_APP_PRIVATE_KEY",
"DOCS_REVALIDATION_KEYS",
"DOCS_REVALIDATION_OVERRIDE_KEYS",
"ENABLED_FEATURES_OVERRIDE_DISABLE_ALL",
"GITHUB_ACTIONS",
"FORCE_ASSET_CDN",
"LOGFLARE_INGESTION_API_KEY",
"LOGFLARE_SOURCE_TOKEN",
"OPENAI_API_KEY",
"SITE_NAME",
"SUPABASE_SECRET_KEY",
],
"inputs": ["$TURBO_DEFAULT$"],
"outputs": [".next/**", "!.next/cache/**"],
},
},
}