Skip to content
deepgram-ci-integration logo

Deepgram CI Integration

deepgram-ci-integration

Configure Deepgram CI/CD integration for automated testing and deployment. Use when setting up continuous integration pipelines, automated testing, or deployment workflows for Deepgram integrations. Trigger with phrases like "deepgram CI", "deepgram CD", "deepgram pipeline", "deepgram github acti...

SKILL.md

Full skill instructions

Deepgram CI Integration

Overview

Set up continuous integration and deployment pipelines for Deepgram integrations.

Prerequisites

  • CI/​CD platform access (GitHub Actions, GitLab CI, etc.)
  • Deepgram API key for testing
  • Secret management configured
  • Test fixtures prepared

Instructions

Step 1: Configure Secrets

Store API keys securely in CI/​CD environment.

Step 2: Create Test Workflow

Set up automated testing on push/​PR.

Step 3: Add Integration Tests

Implement Deepgram-specific integration tests.

Step 4: Configure Deployment

Set up automated deployment pipeline.

Output

  • CI workflow configuration
  • Automated test suite
  • Deployment pipeline
  • Secret management

Examples

GitHub Actions Workflow

# .github/​workflows/​deepgram-ci.yml
name: Deepgram CI

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

env:
  NODE_VERSION: '20'

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/​checkout@v4

      - name: Setup Node.js
        uses: actions/​setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Run unit tests
        run: npm test

      - name: Run integration tests
        env:
          DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY }}
        run: npm run test:integration

      - name: Upload coverage
        uses: codecov/​codecov-action@v3
        with:
          files: ./​coverage/​lcov.info

  lint:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/​checkout@v4

      - name: Setup Node.js
        uses: actions/​setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Run linter
        run: npm run lint

      - name: Type check
        run: npm run typecheck

  integration:
    runs-on: ubuntu-latest
    needs: [test, lint]
    if: github.event_name == 'push' && github.ref == 'refs/​heads/​main'

    steps:
      - uses: actions/​checkout@v4

      - name: Setup Node.js
        uses: actions/​setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Run Deepgram integration tests
        env:
          DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY }}
          DEEPGRAM_PROJECT_ID: ${{ secrets.DEEPGRAM_PROJECT_ID }}
        run: npm run test:deepgram

      - name: Smoke test
        env:
          DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY }}
        run: |
          npm run build
          npm run smoke-test

  deploy:
    runs-on: ubuntu-latest
    needs: [integration]
    if: github.event_name == 'push' && github.ref == 'refs/​heads/​main'

    steps:
      - uses: actions/​checkout@v4

      - name: Deploy to staging
        env:
          DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY_STAGING }}
        run: npm run deploy:staging

      - name: Run post-deploy tests
        env:
          DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY_STAGING }}
        run: npm run test:staging

GitLab CI Configuration

# .gitlab-ci.yml
stages:
  - test
  - build
  - deploy

variables:
  NODE_VERSION: "20"

.node-template:
  image: node:${NODE_VERSION}
  cache:
    key: ${CI_COMMIT_REF_SLUG}
    paths:
      - node_modules/

unit-tests:
  extends: .node-template
  stage: test
  script:
    - npm ci
    - npm test
  coverage: '/​All files[^|]*\|[^|]*\s+([\d\.]+)/'
  artifacts:
    reports:
      coverage_report:
        coverage_format: cobertura
        path: coverage/​cobertura-coverage.xml

integration-tests:
  extends: .node-template
  stage: test
  variables:
    DEEPGRAM_API_KEY: ${DEEPGRAM_API_KEY}
  script:
    - npm ci
    - npm run test:integration
  only:
    - main
    - develop

build:
  extends: .node-template
  stage: build
  script:
    - npm ci
    - npm run build
  artifacts:
    paths:
      - dist/

deploy-staging:
  extends: .node-template
  stage: deploy
  variables:
    DEEPGRAM_API_KEY: ${DEEPGRAM_API_KEY_STAGING}
  script:
    - npm ci
    - npm run deploy:staging
  environment:
    name: staging
  only:
    - main

deploy-production:
  extends: .node-template
  stage: deploy
  variables:
    DEEPGRAM_API_KEY: ${DEEPGRAM_API_KEY_PRODUCTION}
  script:
    - npm ci
    - npm run deploy:production
  environment:
    name: production
  when: manual
  only:
    - main

Integration Test Suite

// tests/​integration/​deepgram.test.ts
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { createClient, DeepgramClient } from '@deepgram/​sdk';

describe('Deepgram Integration Tests', () => {
  let client: DeepgramClient;

  beforeAll(() => {
    const apiKey = process.env.DEEPGRAM_API_KEY;
    if (!apiKey) {
      throw new Error('DEEPGRAM_API_KEY not set');
    }
    client = createClient(apiKey);
  });

  describe('API Connectivity', () => {
    it('should connect to Deepgram API', async () => {
      const { result, error } = await client.manage.getProjects();
      expect(error).toBeNull();
      expect(result).toBeDefined();
    });
  });

  describe('Pre-recorded Transcription', () => {
    it('should transcribe audio from URL', async () => {
      const { result, error } = await client.listen.prerecorded.transcribeUrl(
        { url: 'https://static.deepgram.com/​examples/​nasa-podcast.wav' },
        { model: 'nova-2', smart_format: true }
      );

      expect(error).toBeNull();
      expect(result).toBeDefined();
      expect(result.results.channels[0].alternatives[0].transcript).toBeTruthy();
    }, 30000);

    it('should handle multiple languages', async () => {
      const { result, error } = await client.listen.prerecorded.transcribeUrl(
        { url: 'https://static.deepgram.com/​examples/​nasa-podcast.wav' },
        { model: 'nova-2', detect_language: true }
      );

      expect(error).toBeNull();
      expect(result.results.channels[0].detected_language).toBeDefined();
    }, 30000);
  });

  describe('Error Handling', () => {
    it('should handle invalid URLs gracefully', async () => {
      const { error } = await client.listen.prerecorded.transcribeUrl(
        { url: 'https://invalid.example.com/​audio.wav' },
        { model: 'nova-2' }
      );

      expect(error).toBeDefined();
    });
  });
});

Smoke Test Script

// scripts/​smoke-test.ts
import { createClient } from '@deepgram/​sdk';

async function smokeTest(): Promise<void> {
  console.log('Running Deepgram smoke test...');

  const apiKey = process.env.DEEPGRAM_API_KEY;
  if (!apiKey) {
    throw new Error('DEEPGRAM_API_KEY not set');
  }

  const client = createClient(apiKey);

  // Test 1: API connectivity
  console.log('Testing API connectivity...');
  const { error: connectError } = await client.manage.getProjects();
  if (connectError) {
    throw new Error(`API connectivity failed: ${connectError.message}`);
  }
  console.log('  API connectivity OK');

  // Test 2: Transcription
  console.log('Testing transcription...');
  const { result, error: transcribeError } = await client.listen.prerecorded.transcribeUrl(
    { url: 'https://static.deepgram.com/​examples/​nasa-podcast.wav' },
    { model: 'nova-2', smart_format: true }
  );

  if (transcribeError) {
    throw new Error(`Transcription failed: ${transcribeError.message}`);
  }

  const transcript = result.results.channels[0].alternatives[0].transcript;
  if (!transcript || transcript.length < 10) {
    throw new Error('Transcription result too short');
  }
  console.log('  Transcription OK');

  console.log('\nSmoke test passed!');
}

smokeTest()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error('Smoke test failed:', error.message);
    process.exit(1);
  });

Package.json Scripts

{
  "scripts": {
    "test": "vitest run",
    "test:watch": "vitest",
    "test:integration": "vitest run --config vitest.integration.config.ts",
    "test:deepgram": "vitest run tests/​integration/​deepgram.test.ts",
    "smoke-test": "tsx scripts/​smoke-test.ts",
    "lint": "eslint src --ext .ts",
    "typecheck": "tsc --noEmit",
    "build": "tsc",
    "deploy:staging": "npm run build && ./​scripts/​deploy.sh staging",
    "deploy:production": "npm run build && ./​scripts/​deploy.sh production"
  }
}

Secret Rotation in CI

# .github/​workflows/​rotate-keys.yml
name: Rotate Deepgram Keys

on:
  schedule:
    - cron: '0 0 1 * *'  # First day of each month
  workflow_dispatch:

jobs:
  rotate:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/​checkout@v4

      - name: Rotate API key
        env:
          DEEPGRAM_ADMIN_KEY: ${{ secrets.DEEPGRAM_ADMIN_KEY }}
          DEEPGRAM_PROJECT_ID: ${{ secrets.DEEPGRAM_PROJECT_ID }}
          GH_TOKEN: ${{ secrets.GH_PAT }}
        run: |
          # Create new key
          NEW_KEY=$(curl -s -X POST \
            "https://api.deepgram.com/​v1/​projects/​$DEEPGRAM_PROJECT_ID/​keys" \
            -H "Authorization: Token $DEEPGRAM_ADMIN_KEY" \
            -H "Content-Type: application/​json" \
            -d '{"comment": "CI Key - rotated", "scopes": ["usage:write"]}' \
            | jq -r '.key')

          # Update GitHub secret
          gh secret set DEEPGRAM_API_KEY --body "$NEW_KEY"

          echo "Key rotated successfully"

Resources

Next Steps

Proceed to deepgram-deploy-integration for deployment configuration.

More skills from Dicklesworthstone

environment-setup-guide logo
Dicklesworthstone/pi_agent_rust

environment-setup-guide

Guide developers through setting up development environments with proper tools, dependencies, and configurations

1.8K 0
View
exa-policy-guardrails logo
Dicklesworthstone/pi_agent_rust

exa-policy-guardrails

Implement Exa lint rules, policy enforcement, and automated guardrails. Use when setting up code quality rules for Exa integrations, implementing pre-commit hooks, or configuring CI policy checks for Exa best practices. Trigger with phrases like "exa policy", "exa lint", "exa guardrails", "exa be...

1.8K 0
View
documenso-ci-integration logo
Dicklesworthstone/pi_agent_rust

documenso-ci-integration

Configure CI/CD pipelines for Documenso integrations. Use when setting up automated testing, deployment pipelines, or continuous integration for Documenso projects. Trigger with phrases like "documenso CI", "documenso GitHub Actions", "documenso pipeline", "documenso automated testing".

1.8K 0
View
openrouter-model-availability logo
Dicklesworthstone/pi_agent_rust

openrouter-model-availability

Build check model availability and implement fallback chains. Use when building resilient systems or handling model outages. Trigger with phrases like 'openrouter availability', 'openrouter fallback', 'openrouter model down', 'openrouter health check'.

1.8K 0
View
langfuse-enterprise-rbac logo
Dicklesworthstone/pi_agent_rust

langfuse-enterprise-rbac

Configure Langfuse enterprise organization management and access control. Use when implementing team access controls, configuring organization settings, or setting up role-based permissions for Langfuse projects. Trigger with phrases like "langfuse RBAC", "langfuse teams", "langfuse organization"...

1.8K 0
View
cursor-compliance-audit logo
Dicklesworthstone/pi_agent_rust

cursor-compliance-audit

Execute compliance and security auditing for Cursor usage. Triggers on "cursor compliance", "cursor audit", "cursor security review", "cursor soc2", "cursor gdpr". Use when analyzing or auditing cursor compliance audit. Trigger with phrases like "cursor compliance audit", "cursor audit", "cursor".

1.8K 0
View
apollo-ci-integration logo
Dicklesworthstone/pi_agent_rust

apollo-ci-integration

Configure Apollo.io CI/CD integration. Use when setting up automated testing, continuous integration, or deployment pipelines for Apollo integrations. Trigger with phrases like "apollo ci", "apollo github actions", "apollo pipeline", "apollo ci/cd", "apollo automated tests".

1.8K 0
View
python-script logo
Dicklesworthstone/pi_agent_rust

python-script

Create robust Python automation with full logging and safety checks. Use when tasks need complex data processing, authenticated API work, conditional file operations, or error handling beyond simple shell commands.

1.8K 0
View
posthog-multi-env-setup logo
Dicklesworthstone/pi_agent_rust

posthog-multi-env-setup

Configure PostHog across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment secrets, or implementing environment-specific PostHog configurations. Trigger with phrases like "posthog environments", "posthog staging", "po...

1.8K 0
View
ai-agents-architect logo
Dicklesworthstone/pi_agent_rust

ai-agents-architect

Expert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration. Use when: build agent, AI agent, autonomous agent, tool use, function calling.

1.8K 0
View
insecure-deserialization-checker logo
Dicklesworthstone/pi_agent_rust

insecure-deserialization-checker

Validate insecure deserialization checker operations. Auto-activating skill for Security Fundamentals. Triggers on: insecure deserialization checker, insecure deserialization checker Part of the Security Fundamentals skill category. Use when working with insecure deserialization checker functiona...

1.8K 0
View
path-traversal-finder logo
Dicklesworthstone/pi_agent_rust

path-traversal-finder

Manage path traversal finder operations. Auto-activating skill for Security Fundamentals. Triggers on: path traversal finder, path traversal finder Part of the Security Fundamentals skill category. Use when working with path traversal finder functionality. Trigger with phrases like "path traversa...

1.8K 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View