posthog-ci-integration

Featured

Configure PostHog CI/CD with GitHub Actions: unit tests with mocked PostHog, integration tests against a dev project, and deployment annotations. Trigger: "posthog CI", "posthog GitHub Actions", "posthog automated tests", "CI posthog", "posthog pipeline".

AI & Automation 2,940 stars 439 forks Updated today 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

# PostHog CI Integration ## Overview Set up CI/CD pipelines for PostHog integrations. Covers mocked unit tests (no API key needed), integration tests against a PostHog dev project, and deployment annotations that mark releases in your PostHog timeline. ## Prerequisites - GitHub repository with Actions enabled - PostHog dev project API key for integration tests - PostHog personal API key for deployment annotations - npm/pnpm project with vitest or jest ## Instructions ### Step 1: Configure GitHub Secrets ```bash set -euo pipefail # Project key for integration tests (phc_... from dev project) gh secret set POSTHOG_TEST_KEY --body "phc_dev_project_key" # Personal key for deployment annotations (phx_...) gh secret set POSTHOG_PERSONAL_API_KEY --body "phx_your_personal_key" # Project ID for annotations gh secret set POSTHOG_PROJECT_ID --body "12345" ``` ### Step 2: GitHub Actions Workflow ```yaml # .github/workflows/posthog-tests.yml name: PostHog Tests 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' cache: 'npm' - run: npm ci - run: npm test -- --coverage # Unit tests use mocked PostHog — no API key needed integration-tests: runs-on: ubuntu-latest if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: unit-tests ...

Details

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

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category