clade-ci-integration

Featured

Test and validate Claude integrations in CI/CD pipelines — Use when working with ci-integration patterns. GitHub Actions, mocking strategies, and cost control. Trigger with "anthropic ci", "test claude in ci", "anthropic github actions", "claude automated testing".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Anthropic CI Integration ## Overview Testing Claude integrations in CI requires handling API keys securely, mocking for unit tests, and making real calls only in integration tests. ## GitHub Actions Setup ```yaml # .github/workflows/test.yml name: Test Claude Integration on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - run: npm ci # Unit tests — no API key needed (mocked) - run: npm run test:unit # Integration tests — real API calls - run: npm run test:integration env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} ``` ## Mock Strategy for Unit Tests ```typescript // tests/helpers/mock-anthropic.ts import { vi } from 'vitest'; export function mockAnthropicClient() { return { messages: { create: vi.fn().mockResolvedValue({ id: 'msg_mock', type: 'message', role: 'assistant', model: 'claude-sonnet-4-20250514', content: [{ type: 'text', text: 'Mock response' }], stop_reason: 'end_turn', usage: { input_tokens: 10, output_tokens: 5 }, }), stream: vi.fn().mockReturnValue({ async *[Symbol.asyncIterator]() { yield { type: 'content_block_delta', delta: { type: 'text_delta', text: 'Mock' } }; }, finalMessage: vi.fn().mockResolvedValue({ usage: { input_tokens: 10, output_toke...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category