Set up continuous integration and deployment pipelines for Deepgram integrations. Covers GitHub Actions, GitLab CI, integration test suites, smoke tests, and automated key rotation.
Store DEEPGRAM_API_KEY and DEEPGRAM_PROJECT_ID as CI/CD secrets. Use separate keys per environment.
Set up automated testing on push/PR with unit tests, linting, and type checking.
Implement Deepgram-specific integration tests: API connectivity, pre-recorded transcription, language detection, and error handling.
Set up staged deployment: test -> lint -> integration -> staging deploy -> smoke test.
Configure monthly automated key rotation via gh secret set in a scheduled workflow.
| Issue | Cause | Resolution |
|---|---|---|
| Integration tests fail | Invalid or expired API key | Rotate DEEPGRAM_API_KEY secret |
| Smoke test timeout | API latency or network issues | Increase timeout, check status page |
| Build fails | Missing dependencies | Verify npm ci succeeds |
DEEPGRAM_API_KEY=xxx npx tsx scripts/smoke-test.ts
Tests API connectivity and transcription of the NASA podcast sample, exits non-zero on failure.
{
"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"
}
See detailed implementation for advanced patterns.