AP

apollo-ci-integration

Set up CI/CD for Apollo.io with GitHub Actions and MSW mocks.

Install

mkdir -p .claude/skills/apollo-ci-integration && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7101" && unzip -o skill.zip -d .claude/skills/apollo-ci-integration && rm skill.zip

Installs to .claude/skills/apollo-ci-integration

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Configure Apollo.io CI/CD integration.
38 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Configure GitHub Actions for Apollo
  • Implement MSW mocks for unit tests
  • Manage environment secrets
  • Execute automated health checks
  • Scan for hardcoded API keys

How it works

The tool provides a structured GitHub Actions workflow that separates unit tests (using MSW mocks) from integration tests (using live API keys). It includes security scanning to prevent credential leaks.

Inputs & outputs

You give it
Apollo.io integration codebase
You get back
CI/CD pipeline configuration

When to use apollo-ci-integration

  • Set up GitHub Actions for Apollo integrations
  • Implement MSW mocks for unit testing
  • Manage environment secrets for staging and production
  • Configure automated linting and type checking

About this skill

Apollo CI Integration

Overview

Set up CI/CD pipelines for Apollo.io integrations with GitHub Actions. Uses MSW mocks for unit tests (zero API calls), sandbox tokens for staging, and live API tests gated to main branch only. Apollo's sandbox token returns dummy data without consuming credits.

Prerequisites

  • GitHub repository with Actions enabled
  • Apollo master API key + sandbox token
  • Node.js 18+

Instructions

Step 1: Store Secrets in GitHub

# Master API key for integration tests (main branch only)
gh secret set APOLLO_API_KEY --body "$APOLLO_API_KEY"

# Sandbox token for staging tests (safe, no credits)
gh secret set APOLLO_SANDBOX_KEY --body "$APOLLO_SANDBOX_KEY"

Step 2: GitHub Actions Workflow

# .github/workflows/apollo-ci.yml
name: Apollo CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  lint-and-typecheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'npm' }
      - run: npm ci
      - run: npm run lint
      - run: npm run typecheck

  unit-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'npm' }
      - run: npm ci
      - run: npm test
        # Unit tests use MSW mocks — zero API calls

  integration-tests:
    runs-on: ubuntu-latest
    if: github.event_name == 'push' && github.ref == 'refs/heads/main'
    needs: [unit-tests]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'npm' }
      - run: npm ci
      - name: Apollo Health Check
        env:
          APOLLO_API_KEY: ${{ secrets.APOLLO_API_KEY }}
        run: |
          STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
            -H "x-api-key: $APOLLO_API_KEY" \
            "https://api.apollo.io/api/v1/auth/health")
          echo "Apollo API: HTTP $STATUS"
          [ "$STATUS" = "200" ] || exit 1
      - run: npm run test:integration
        env:
          APOLLO_API_KEY: ${{ secrets.APOLLO_API_KEY }}

  secret-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Check for hardcoded API keys
        run: |
          if grep -rn 'x-api-key.*[a-zA-Z0-9]\{20,\}' src/ --include='*.ts' --include='*.js'; then
            echo "Potential hardcoded API key found!"
            exit 1
          fi
          echo "No hardcoded secrets"

Step 3: MSW-Based Unit Tests

// src/__tests__/apollo.test.ts
import { describe, it, expect, beforeAll, afterAll, afterEach } from 'vitest';
import { setupServer } from 'msw/node';
import { http, HttpResponse } from 'msw';

const BASE = 'https://api.apollo.io/api/v1';
const mockServer = setupServer(
  http.post(`${BASE}/mixed_people/api_search`, () =>
    HttpResponse.json({
      people: [{ id: '1', name: 'Jane Doe', title: 'VP Sales' }],
      pagination: { page: 1, per_page: 25, total_entries: 1, total_pages: 1 },
    }),
  ),
  http.post(`${BASE}/people/match`, () =>
    HttpResponse.json({
      person: { id: '1', name: 'Jane Doe', email: '[email protected]', title: 'VP Sales' },
    }),
  ),
  http.get(`${BASE}/auth/health`, () =>
    HttpResponse.json({ is_logged_in: true }),
  ),
);

beforeAll(() => mockServer.listen());
afterEach(() => mockServer.resetHandlers());
afterAll(() => mockServer.close());

describe('People Search', () => {
  it('returns contacts from search', async () => {
    const { searchPeople } = await import('../workflows/lead-search');
    const result = await searchPeople({ domains: ['test.com'] });
    expect(result.people).toHaveLength(1);
    expect(result.people[0].name).toBe('Jane Doe');
  });

  it('handles 429 errors', async () => {
    mockServer.use(
      http.post(`${BASE}/mixed_people/api_search`, () =>
        HttpResponse.json({ message: 'Rate limited' }, { status: 429 }),
      ),
    );
    const { searchPeople } = await import('../workflows/lead-search');
    await expect(searchPeople({ domains: ['test.com'] })).rejects.toThrow();
  });
});

Step 4: Integration Tests (Live API)

// src/__tests__/integration/apollo-live.test.ts
import { describe, it, expect } from 'vitest';
import axios from 'axios';

const SKIP = !process.env.APOLLO_API_KEY;
const client = axios.create({
  baseURL: 'https://api.apollo.io/api/v1',
  headers: { 'Content-Type': 'application/json', 'x-api-key': process.env.APOLLO_API_KEY! },
});

describe.skipIf(SKIP)('Apollo Live Integration', () => {
  it('searches for people at apollo.io', async () => {
    const { data } = await client.post('/mixed_people/api_search', {
      q_organization_domains_list: ['apollo.io'],
      per_page: 5,
    });
    expect(data.people.length).toBeGreaterThan(0);
  });

  it('enriches organization by domain', async () => {
    const { data } = await client.get('/organizations/enrich', { params: { domain: 'apollo.io' } });
    expect(data.organization).toBeDefined();
    expect(data.organization.name).toContain('Apollo');
  });
});

Output

  • GitHub Actions workflow with lint, typecheck, unit test, integration test, and secret scan jobs
  • MSW mock server for zero-API-call unit tests in PRs
  • Live integration tests gated to main branch pushes only
  • Apollo health check step before integration tests
  • Secret scanning to prevent API key commits

Error Handling

IssueResolution
Secret not foundgh secret list to verify, re-add with gh secret set
Rate limited in CIUnit tests use MSW, integration tests run only on main
Health check failsCheck status.apollo.io; skip flaky on outage
Hardcoded key foundSecret scan job fails the build; rotate the key immediately

Resources

Next Steps

Proceed to apollo-deploy-integration for deployment configuration.

When not to use it

  • Running integration tests on non-main branches
  • Storing production API keys in plain text

Prerequisites

GitHub repository with Actions enabledApollo master API key and sandbox tokenNode.js 18+

Limitations

  • Integration tests gated to main branch only
  • Requires manual secret management via GitHub CLI

How it compares

It specifically integrates Apollo-specific sandbox tokens and health checks into a standard CI/CD pipeline, whereas generic setups require manual configuration of these specific API behaviors.

Compared to similar skills

apollo-ci-integration side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
apollo-ci-integration (this skill)126dCautionIntermediate
perf-lighthouse135moReviewIntermediate
smoke-test64moReviewBeginner
1k-dev-commands228dReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

perf-lighthouse

tech-leads-club

Run Lighthouse audits locally via CLI or Node API, parse and interpret reports, set performance budgets. Use when measuring site performance, understanding Lighthouse scores, setting up budgets, or integrating audits into CI. Triggers on: lighthouse, run lighthouse, lighthouse score, performance audit, performance budget.

1361

smoke-test

mastra-ai

Create a Mastra project using create-mastra and smoke test the studio in Chrome

616

1k-dev-commands

OneKeyHQ

Development commands — yarn scripts for dev servers, building, linting, testing, and troubleshooting.

24

instantly-ci-integration

jeremylongshore

Configure Instantly CI/CD integration with GitHub Actions and testing. Use when setting up automated testing, configuring CI pipelines, or integrating Instantly tests into your build process. Trigger with phrases like "instantly CI", "instantly GitHub Actions", "instantly automated tests", "CI instantly".

14

groq-ci-integration

jeremylongshore

Configure Groq CI/CD integration with GitHub Actions and testing. Use when setting up automated testing, configuring CI pipelines, or integrating Groq tests into your build process. Trigger with phrases like "groq CI", "groq GitHub Actions", "groq automated tests", "CI groq".

13

obsidian-ci-integration

jeremylongshore

Set up GitHub Actions CI/CD for Obsidian plugin development. Use when automating builds, tests, and releases for your plugin, or setting up continuous integration for Obsidian projects. Trigger with phrases like "obsidian CI", "obsidian github actions", "obsidian automated build", "obsidian CI/CD".

03

Search skills

Search the agent skills registry