| name | klaviyo-ci-integration |
| description | Configure CI/CD pipelines for Klaviyo integrations with GitHub Actions.
Use when setting up automated testing, configuring CI secrets,
or integrating Klaviyo SDK tests into your build pipeline.
Trigger with phrases like "klaviyo CI", "klaviyo GitHub Actions",
"klaviyo automated tests", "CI klaviyo", "klaviyo pipeline".
|
| allowed-tools | Read, Write, Edit, Bash(gh:*), Bash(npm:*) |
| version | 1.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","klaviyo","email-marketing","cdp"] |
| compatibility | Designed for Claude Code |
Klaviyo CI Integration
Overview
Set up a GitHub Actions CI/CD pipeline for Klaviyo integrations: mocked unit tests
on every pull request, gated integration tests against the real Klaviyo API on
main-branch pushes, SDK-version verification, and an API connectivity smoke test.
The workflow follows the standard two-job split — a fast, key-free unit-tests job
safe to require on every PR, and an integration-tests job gated so real-API calls
never run on fork PRs where secrets are unavailable.
Prerequisites
- GitHub repository with Actions enabled
- Klaviyo test API key (from a test/sandbox account)
klaviyo-api SDK and Vitest configured in the repository
Instructions
Step 1: Configure GitHub secrets
Store the Klaviyo test credentials as encrypted repository secrets:
gh secret set KLAVIYO_PRIVATE_KEY --body "pk_test_***"
gh secret set KLAVIYO_WEBHOOK_SIGNING_SECRET --body "whsec_test_***"
Step 2: Add the CI workflow
Create .github/workflows/klaviyo-ci.yml with two jobs. The essential skeleton:
name: Klaviyo Integration CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20', }
[]