Skills Development Clari CI/CD Pipeline Validation

Clari CI/CD Pipeline Validation

v20260423
clari-ci-integration
Automate the testing and validation of Clari export pipelines within a Continuous Integration/Continuous Deployment (CI/CD) environment. This tool helps developers ensure API connectivity, validate export schemas, and systematically test the reliability of Clari integrations, preventing deployment issues before they reach production.
Get Skill
368 downloads
Overview

Clari CI Integration

Overview

Add Clari export validation to CI: test API connectivity, validate export schemas, and run pipeline integration tests.

Instructions

GitHub Actions Workflow

name: Clari Pipeline Tests

on:
  push:
    paths: ["src/clari/**", "tests/clari/**"]
  schedule:
    - cron: "0 6 * * 1"  # Weekly Monday check

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - run: pip install -r requirements.txt

      - name: Unit tests (mock data)
        run: pytest tests/ -v -k "not integration"

      - name: Integration test (real API)
        if: github.ref == 'refs/heads/main'
        env:
          CLARI_API_KEY: ${{ secrets.CLARI_API_KEY }}
        run: |
          python -c "
          from clari_client import ClariClient
          client = ClariClient()
          forecasts = client.list_forecasts()
          assert len(forecasts) > 0, 'No forecasts found'
          print(f'Connected: {len(forecasts)} forecasts available')
          "

      - name: Schema validation
        env:
          CLARI_API_KEY: ${{ secrets.CLARI_API_KEY }}
        run: |
          python scripts/validate_schema.py

Store Secrets

gh secret set CLARI_API_KEY --body "your-api-token"

Resources

Next Steps

For deployment patterns, see clari-deploy-integration.

Info
Category Development
Name clari-ci-integration
Version v20260423
Size 2.04KB
Updated At 2026-04-26
Language