feat: add automated smoke test system with Trigger.dev integration - #1
Draft
niteshift-dev-staging[bot] wants to merge 1 commit into
Draft
feat: add automated smoke test system with Trigger.dev integration#1niteshift-dev-staging[bot] wants to merge 1 commit into
niteshift-dev-staging[bot] wants to merge 1 commit into
Conversation
Implements a comprehensive smoke test automation system that runs periodic health checks on critical Cal.diy infrastructure components. The system uses Trigger.dev scheduled tasks and sends Slack notifications on failures. Features: - On-demand smoke tests via Trigger.dev tasks - Scheduled tests running every 15 minutes - Multiple test types (database, API, auth, bookings, calendars) - Slack notifications with configurable success/failure alerts - Full DI integration following Cal.diy patterns - Comprehensive test coverage Test types: - database-connection: Validates Prisma database connectivity - api-health: Tests basic API queries and health - auth-flow: Verifies authentication system functionality - booking-flow: Checks booking system health - calendar-integration: Tests calendar credential access - all: Runs complete test suite Architecture: - Service layer: SmokeTestService with dependency injection - Trigger.dev tasks: On-demand and scheduled execution - Queue config: Concurrency limit of 5, optimized retry policy - Slack integration: Formatted notifications with test results Files added: - packages/features/smoke-tests/services/SmokeTestService.ts - packages/features/smoke-tests/lib/tasker/trigger/run-smoke-tests.ts - packages/features/smoke-tests/lib/tasker/trigger/scheduled-smoke-tests.ts - packages/features/smoke-tests/di/* (DI setup) - packages/features/smoke-tests/README.md (documentation) - packages/features/smoke-tests/USAGE.md (usage guide) - Unit tests with >80% coverage Configuration: - Added smoke-tests to trigger.config.ts dirs - Registered DI tokens in central tokens file - Environment variables: SMOKE_TEST_SLACK_WEBHOOK_URL Run-on: Niteshift Preview Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Features
Test Types
Trigger.dev Tasks
On-demand task (
smoke-tests.run):Scheduled task (
smoke-tests.scheduled):Architecture
SmokeTestServicewith full dependency injectionSMOKE_TEST_SLACK_WEBHOOK_URLfor optional notificationsFiles Added
Test Plan
SmokeTestServicewith >80% coveragenpx trigger.dev@latest devEnvironment Setup
Deployment
cd packages/features && yarn deploy:trigger:stagingdraft-releaseCI actionDocumentation
README.md: Architecture, configuration, extending testsUSAGE.md: Quick start, examples, troubleshooting🤖 Generated with Claude Code
🌒 Run on Niteshift: View Task