Configure CI/CD pipelines for Clay integrations with automated testing and validation.
Use when setting up automated tests for Clay webhook handlers, validating
enrichment data quality in CI, or integrating Clay checks into your build process.
Trigger with phrases like "clay CI", "clay GitHub Actions",
"clay automated tests", "CI clay", "test clay integration".
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Configure CI/CD pipelines for Clay integrations with automated testing and validation.
Use when setting up automated tests for Clay webhook handlers, validating
enrichment data quality in CI, or integrating Clay checks into your build process.
Trigger with phrases like "clay CI", "clay GitHub Actions",
"clay automated tests", "CI clay", "test clay integration".
allowed-tools
Read, Write, Edit, Bash(gh:*), Bash(npm:*)
version
1.14.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
["saas","clay","testing","ci-cd"]
compatibility
Designed for Claude Code, also compatible with Codex and OpenClaw
Clay CI Integration
Overview
Set up CI/CD pipelines for Clay-powered applications. Since Clay is a web platform (not a local service), CI focuses on: (1) testing webhook handler code, (2) validating data transformation logic, (3) checking enrichment data schema compliance, and (4) optional live integration tests against Clay's API.
# No Clay credentials needed for unit tests (use mocks)
CLAY_WEBHOOK_URL:
"https://mock.webhook.test"
data-validation:
runs-on:
ubuntu-latest
steps:
-
uses:
actions/checkout@v4
-
uses:
actions/setup-node@v4
with:
node-version:
'20'
cache:
'npm'
-
run:
npm
ci
-
name:
Validate
input
data
schemas
run:
npx
tsx
scripts/validate-clay-schemas.ts
-
name:
Check
for
PII
in
test
fixtures
run:
|
if grep -rn '@gmail.com\|@yahoo.com\|@hotmail.com' test/fixtures/; then
echo "ERROR: Real email addresses found in test fixtures"
exit 1
fi
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:
Test
webhook
connectivity
run:
|
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
-X POST "$CLAY_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d '{"_ci_test": true, "_run_id": "${{ github.run_id }}"}')
if [ "$HTTP_CODE" != "200" ]; then
echo "Webhook connectivity check failed: HTTP $HTTP_CODE"
exit 1
fi
Step 2: Configure Secrets
# Store Clay credentials as GitHub secrets
gh secret set CLAY_WEBHOOK_URL --body "https://app.clay.com/api/v1/webhooks/your-id"
gh secret set CLAY_API_KEY --body "clay_ent_your_key"# Enterprise only
// scripts/validate-clay-schemas.tsimport { z } from'zod';
constClayEnrichedRowSchema = z.object({
email: z.string().email(),
domain: z.string().min(3),
company_name: z.string().nullable(),
job_title: z.string().nullable(),
employee_count: z.number().nullable(),
industry: z.string().nullable(),
linkedin_url: z.string().url().nullable(),
});
constClayWebhookInputSchema = z.object({
domain: z.string().min(3).refine(d => d.includes('.'), 'Must contain a dot'),
first_name: z.string().min(1),
last_name: z.string().min(1),
email: z.string().email().optional(),
source: z.string().optional(),
});
// Validate test fixtures match expected schemasconsole.log('Validating Clay schemas...');
// Run against test fixtures, mock data, etc.console.log('All schemas valid.');
Step 5: Credit Budget Guard in CI
# Add to workflow to prevent accidental high-volume runs-name:Checkcreditbudgetrun:|
MAX_ROWS=10 # CI should never enrich more than 10 test rows
ROWS_TO_SEND=$(wc -l < test/fixtures/test-leads.csv)
if [ "$ROWS_TO_SEND" -gt "$MAX_ROWS" ]; then
echo "ERROR: Test fixture has $ROWS_TO_SEND rows (max: $MAX_ROWS)"
echo "Integration tests should use minimal data to avoid credit waste"
exit 1
fi