Integrate TwinMind testing and validation into CI/CD pipelines with GitHub Actions workflows, unit tests, integration tests, smoke tests, and GitLab CI configuration.
Create a multi-job workflow with lint-and-typecheck, unit-tests, integration-tests (with API key from secrets), api-health-check, and transcription-smoke-test (on main/schedule only).
Build Vitest unit tests mocking the TwinMind client. Test correct request formatting, rate limit handling (429 responses), and summary generation response parsing.
Create integration tests that use real API keys (from environment variables). Test API health, account access, and actual transcription with configurable test audio URL.
Create a standalone smoke test runner that checks API health, account access, and optionally transcription. Report pass/fail with duration for each test.
Set up equivalent GitLab CI with lint, test, integration stages. Use YAML anchors for shared node template. Configure coverage reporting and scheduled runs.
Set up vitest.config.ts with V8 coverage provider, 30s test timeout, and separate test scripts for unit, integration, and smoke tests.
See detailed implementation for complete GitHub Actions YAML, test files, smoke test runner, and GitLab CI config.
| Issue | Cause | Solution |
|---|---|---|
| Secret not found | Not configured | Add to GitHub/GitLab Secrets |
| Test timeout | Large audio file | Use 10-30 second test samples |
| Rate limited in CI | Too many runs | Use dedicated test API key |
| API unavailable | TwinMind outage | Add retry logic to tests |
Basic usage: Apply twinmind ci integration to a standard project setup with default configuration options.
Advanced scenario: Customize twinmind ci integration for production environments with multiple constraints and team-specific requirements.
For deployment integration, see twinmind-deploy-integration.