This directory contains the GitHub Actions workflows for the Kiro Steering Loader extension. The CI/CD pipeline provides comprehensive testing, quality assurance, and automated deployment.
Triggers: Push to main/develop, Pull Requests
Jobs:
- Test Matrix: Runs tests on Ubuntu, Windows, and macOS with Node.js 18.x and 20.x
- Lint & Type Check: TypeScript compilation and type checking
- Package: Creates VSIX package for distribution
- Coverage Check: Enforces 85% code coverage threshold
- Performance Regression: Detects performance degradation
Test Coverage:
- Unit tests for all core components
- Integration tests for VS Code extension functionality
- End-to-end tests using @vscode/test-electron
- Performance tests including memory usage monitoring
Triggers: Pull Request events (opened, synchronized, reopened)
Features:
- Coverage delta analysis (prevents >2% coverage decrease)
- Performance impact assessment
- Security vulnerability scanning
- Code quality checks
- Automated PR comments with test results
Triggers: Daily at 2 AM UTC, Manual dispatch
Comprehensive Testing:
- Large dataset performance testing (100-1000+ templates)
- Cross-platform compatibility matrix
- Memory leak detection
- Security auditing
- Dependency update checking
Triggers: Git tags (v*), Manual dispatch
Release Process:
- Pre-release testing with full test suite
- Coverage verification (≥85% required)
- Extension packaging with vsce
- GitHub release creation with artifacts
- VS Code Marketplace publishing (requires
VSCE_PATsecret)
The following secrets need to be configured in the repository:
VSCE_PAT: Personal Access Token for VS Code Marketplace publishingCODECOV_TOKEN: (Optional) Token for Codecov integration
The marketplace environment should be configured with protection rules for the release workflow.
- Minimum Coverage: 85% line coverage
- PR Coverage Delta: Cannot decrease by more than 2%
- Coverage Reporting: Automated reports uploaded to Codecov
- Activation Time: <500ms baseline, <15% regression allowed
- Memory Usage: <50MB baseline, <20% increase allowed
- Large Dataset: Must handle 1000+ templates within performance bounds
- Vulnerability Scanning: No high or critical vulnerabilities allowed
- Dependency Auditing: Regular security audits in nightly builds
- Automated Updates: Dependency update notifications
# Run all tests
npm run test
# Run with coverage
npm run test:coverage
# Run E2E tests
npm run test:e2e
# Run performance tests
npm run test:performance
# Run memory tests
npm run test:memoryThe workflows use the following environment variables:
DISPLAY=:99.0: For Linux E2E testing with virtual displayNODE_OPTIONS: Memory and garbage collection settings for performance tests
test-results-{os}-{node-version}: Test results and coverage reportsnightly-performance-results: Comprehensive performance dataplatform-results-{os}-node{version}: Cross-platform compatibility results
extension-package: VSIX file for distributiondependency-report: Outdated dependency analysis
- Baseline performance metrics stored in
coverage/performance-baseline.json - Regression detection with configurable thresholds
- Performance trend tracking over time
- Automated PR comments with test summaries
- Coverage trend visualization
- Performance impact analysis
- Detailed error logs and stack traces
- Artifact preservation for debugging
- Notification integration (can be extended with Slack/Teams)
- Review and update Node.js versions in matrix
- Update performance baselines when legitimate improvements are made
- Monitor dependency security advisories
- Review and adjust coverage thresholds as codebase evolves
Common Issues:
- E2E Test Failures: Check display configuration for Linux runners
- Coverage Drops: Ensure new code includes appropriate tests
- Performance Regression: Review recent changes for optimization opportunities
- Security Vulnerabilities: Update dependencies or apply patches
Debug Commands:
# Local E2E debugging
npm run test:e2e -- --reporter=verbose
# Performance profiling
npm run test:performance -- --reporter=verbose
# Memory analysis
npm run test:memory -- --expose-gcThe workflows are designed to be extensible:
- Add new test categories by creating additional jobs
- Extend platform matrix for additional OS/Node.js combinations
- Integrate additional quality tools (ESLint, Prettier, etc.)
- Add deployment targets (Open VSX Registry, etc.)
For questions or issues with the CI/CD pipeline, please create an issue with the ci/cd label.