|
| 1 | +# CI Configuration Templates |
| 2 | + |
| 3 | +This directory contains template CI configuration files for different types of repositories. These templates provide pre-configured setups that you can copy and customize for your project. |
| 4 | + |
| 5 | +## Quick Start |
| 6 | + |
| 7 | +1. Choose the appropriate template for your project type |
| 8 | +2. Copy the template to your repository root as `.github/ci-config.yml` |
| 9 | +3. Customize any settings as needed |
| 10 | +4. Commit and push to enable the CI pipeline |
| 11 | + |
| 12 | +```bash |
| 13 | +# Example: Copy the Vercel template |
| 14 | +cp .github/templates/template-vercel.yml .github/ci-config.yml |
| 15 | +``` |
| 16 | + |
| 17 | +## Available Templates |
| 18 | + |
| 19 | +### template-vercel.yml |
| 20 | + |
| 21 | +**Best for:** Next.js applications deployed to Vercel |
| 22 | + |
| 23 | +**Features:** |
| 24 | +- Full basic CI (lint, typecheck, vitest) |
| 25 | +- Playwright E2E tests against Vercel previews |
| 26 | +- AI-powered code reviews with UI screenshot analysis |
| 27 | +- Vercel deployment integration |
| 28 | + |
| 29 | +**Use when:** |
| 30 | +- Building a Next.js or React application |
| 31 | +- Deploying frontend to Vercel |
| 32 | +- Want AI to review UI changes visually |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +### template-supabase-vercel.yml |
| 37 | + |
| 38 | +**Best for:** Full-stack apps with Supabase backend and Vercel frontend |
| 39 | + |
| 40 | +**Features:** |
| 41 | +- Everything in template-vercel.yml |
| 42 | +- Supabase preview branches for PRs |
| 43 | +- Database migration automation |
| 44 | +- E2E tests with database access |
| 45 | + |
| 46 | +**Use when:** |
| 47 | +- Using Supabase for authentication, database, or storage |
| 48 | +- Need isolated database environments for PR previews |
| 49 | +- Running E2E tests that require database seeding |
| 50 | + |
| 51 | +**Required secrets:** |
| 52 | +- `SUPABASE_ACCESS_TOKEN` |
| 53 | +- `SUPABASE_PROJECT_ID` (or configured per-environment) |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +### template-cloudflare.yml |
| 58 | + |
| 59 | +**Best for:** Applications deployed to Cloudflare Pages |
| 60 | + |
| 61 | +**Features:** |
| 62 | +- Full basic CI (lint, typecheck, vitest) |
| 63 | +- Playwright E2E tests against Cloudflare previews |
| 64 | +- AI-powered code reviews with UI screenshot analysis |
| 65 | +- Cloudflare Pages deployment integration |
| 66 | + |
| 67 | +**Use when:** |
| 68 | +- Deploying to Cloudflare Pages |
| 69 | +- Using Cloudflare Workers or D1 |
| 70 | +- Want edge-first performance |
| 71 | + |
| 72 | +**Required secrets:** |
| 73 | +- `CLOUDFLARE_API_TOKEN` |
| 74 | +- `CLOUDFLARE_ACCOUNT_ID` |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +### template-non-deployable.yml |
| 79 | + |
| 80 | +**Best for:** Libraries, GitHub Actions, CLI tools, and packages |
| 81 | + |
| 82 | +**Features:** |
| 83 | +- Full basic CI (lint, typecheck, vitest) |
| 84 | +- AI-powered code reviews (no UI review) |
| 85 | +- No deployment or E2E testing |
| 86 | + |
| 87 | +**Use when:** |
| 88 | +- Building an NPM package or library |
| 89 | +- Creating GitHub Actions |
| 90 | +- Building CLI tools |
| 91 | +- Working on monorepo shared packages |
| 92 | +- Any project without a hosted deployment |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +## Configuration Reference |
| 97 | + |
| 98 | +### Basic CI Options |
| 99 | + |
| 100 | +```yaml |
| 101 | +ci: |
| 102 | + basic: |
| 103 | + enabled: true # Master toggle for basic CI |
| 104 | + lint: true # ESLint checks |
| 105 | + typecheck: true # TypeScript compilation |
| 106 | + vitest: true # Unit/integration tests |
| 107 | +``` |
| 108 | +
|
| 109 | +### E2E Testing Options |
| 110 | +
|
| 111 | +```yaml |
| 112 | +ci: |
| 113 | + e2e: |
| 114 | + enabled: true # Master toggle for E2E |
| 115 | + framework: playwright # Testing framework |
| 116 | + wait_for_deployment: true # Wait for preview before testing |
| 117 | +``` |
| 118 | +
|
| 119 | +### Review Options |
| 120 | +
|
| 121 | +```yaml |
| 122 | +ci: |
| 123 | + reviews: |
| 124 | + enabled: true # Master toggle for AI reviews |
| 125 | + requirements: true # Check against REQUIREMENTS.md |
| 126 | + rules: true # Enforce .claude/rules/ |
| 127 | + project_memory: true # Use CLAUDE.md context |
| 128 | + agents: true # Multi-agent review |
| 129 | + skills: true # Specialized skills |
| 130 | + playwright_ui: true # Visual UI review |
| 131 | +``` |
| 132 | +
|
| 133 | +### Deployment Options |
| 134 | +
|
| 135 | +```yaml |
| 136 | +ci: |
| 137 | + deployment: |
| 138 | + enabled: true |
| 139 | + vercel: |
| 140 | + enabled: true # Vercel integration |
| 141 | + supabase: |
| 142 | + enabled: false # Supabase integration |
| 143 | + cloudflare: |
| 144 | + enabled: false # Cloudflare Pages integration |
| 145 | +``` |
| 146 | +
|
| 147 | +## Customization Tips |
| 148 | +
|
| 149 | +### Disabling Specific Checks |
| 150 | +
|
| 151 | +If your project doesn't use TypeScript: |
| 152 | +```yaml |
| 153 | +ci: |
| 154 | + basic: |
| 155 | + typecheck: false |
| 156 | +``` |
| 157 | +
|
| 158 | +### Adding Multiple Deployments |
| 159 | +
|
| 160 | +You can enable multiple deployment platforms if needed: |
| 161 | +```yaml |
| 162 | +ci: |
| 163 | + deployment: |
| 164 | + enabled: true |
| 165 | + vercel: |
| 166 | + enabled: true |
| 167 | + supabase: |
| 168 | + enabled: true |
| 169 | +``` |
| 170 | +
|
| 171 | +### Minimal Configuration |
| 172 | +
|
| 173 | +For a minimal setup with just linting: |
| 174 | +```yaml |
| 175 | +ci: |
| 176 | + basic: |
| 177 | + enabled: true |
| 178 | + lint: true |
| 179 | + typecheck: false |
| 180 | + vitest: false |
| 181 | + e2e: |
| 182 | + enabled: false |
| 183 | + reviews: |
| 184 | + enabled: false |
| 185 | + deployment: |
| 186 | + enabled: false |
| 187 | +``` |
| 188 | +
|
| 189 | +## Troubleshooting |
| 190 | +
|
| 191 | +### E2E tests timing out |
| 192 | +- Increase the deployment wait timeout in your workflow |
| 193 | +- Ensure `wait_for_deployment: true` is set |
| 194 | + |
| 195 | +### Reviews not running |
| 196 | +- Check that `reviews.enabled: true` |
| 197 | +- Verify `ANTHROPIC_API_KEY` secret is configured |
| 198 | + |
| 199 | +### Deployment not detected |
| 200 | +- Ensure the correct platform is enabled |
| 201 | +- Check that required secrets are configured |
| 202 | +- Verify your deployment platform's GitHub integration is set up |
0 commit comments