This document describes the comprehensive CI/CD pipeline for the Inline Live Server VS Code extension, providing automated testing, validation, and deployment capabilities.
The pipeline consists of three main workflows:
- CI/CD Pipeline (
ci.yml) - Comprehensive testing and validation - Deployment Pipeline (
deploy.yml) - VS Code marketplace publishing - Test Reporting (
test-reporting.yml) - Detailed test analysis and coverage
- Multi-platform testing (Windows, macOS, Linux)
- Node.js version matrix (16, 18, 20)
- Unit tests with @vscode/test-electron
- Smoke tests for critical functionality
- End-to-end tests with WebDriver
- VS Code compatibility testing across versions
- Pre-publish validation with comprehensive checks
- Security scanning with npm audit and Snyk
- CodeQL analysis for vulnerability detection
- Bundle size validation and optimization
- Dependency vulnerability scanning
- Coverage reporting with configurable thresholds
- Performance benchmarking and monitoring
- Comprehensive test reports with detailed analysis
- External dashboard integration support
- PR commenting with test results
- Automated versioning (patch, minor, major, prerelease)
- VS Code marketplace publishing with approval gates
- GitHub releases with automatic tagging
- Rollback procedures for failed deployments
- Post-deployment monitoring and health checks
The CI pipeline runs automatically on:
- Push to
mainordevelopbranches - Pull requests to
mainordevelopbranches - Manual trigger via GitHub Actions UI
- Go to Actions tab in GitHub repository
- Select Deploy to VS Code Marketplace workflow
- Click Run workflow
- Choose deployment environment and version type
- Confirm deployment
Set up the following secrets in your GitHub repository:
# VS Code Marketplace Personal Access Token
VSCE_PAT=your_personal_access_token
# Snyk API token (optional, for security scanning)
SNYK_TOKEN=your_snyk_token
# GitHub token (automatically provided)
GITHUB_TOKEN=automatically_provided- Lint and Type Check - Code quality validation
- Unit Tests - Multi-platform testing matrix
- Smoke Tests - Critical functionality verification
- E2E Tests - End-to-end testing
- Build and Package - Extension packaging and validation
- Security Scan - Vulnerability and security analysis
- Platform Compatibility - Cross-platform testing
- Performance Analysis - Bundle analysis and optimization
- Quality Gate - Overall pipeline validation
- Notification - Success/failure notifications
- Operating Systems: Ubuntu, Windows, macOS
- Node.js Versions: 16, 18, 20
- VS Code Versions: 1.74.0, 1.80.0, 1.85.0
- Pre-deployment Validation - Full test suite execution
- Staging Deployment - Deploy to staging environment
- Production Deployment - Deploy to production (manual approval)
- Automated Pre-release - Automatic beta releases from develop
- Rollback - Automated rollback on failure
- Post-deployment Monitoring - Health checks and monitoring
- Patch: Bug fixes (1.0.0 → 1.0.1)
- Minor: New features (1.0.0 → 1.1.0)
- Major: Breaking changes (1.0.0 → 2.0.0)
- Prerelease: Beta releases (1.0.0 → 1.0.1-beta.1)
- Target Threshold: 80%
- Minimum Threshold: 70%
- Coverage Tools: nyc, Istanbul
- External Integration: Codecov
- Build Performance - Compilation time tracking
- Test Performance - Test execution time
- Package Performance - Extension packaging time
NODE_VERSION: '18'
VSCODE_VERSION: '1.74.0'
COVERAGE_THRESHOLD: 80
MIN_COVERAGE_THRESHOLD: 70- Unit Tests:
npm run test:unit - Smoke Tests:
npx ts-node test/smoke-tests.ts - E2E Tests:
npm run test:e2e - Linting:
npm run test:lint
- Development Build:
npm run compile:dev - Production Build:
npm run compile:prod - Bundle Analysis:
npm run build:analyze
All test results are automatically uploaded as artifacts:
- Unit test results and coverage reports
- Smoke test execution logs and reports
- E2E test results and screenshots
- Performance benchmark data
- Bundle analysis reports
The pipeline includes multiple quality gates:
- Code Quality: Linting and type checking
- Test Coverage: Minimum coverage thresholds
- Security: Vulnerability scanning
- Performance: Bundle size limits
- Compatibility: Cross-platform validation
- Check job logs in GitHub Actions UI
- Verify Node.js version compatibility
- Review test artifacts for detailed error information
- Check dependency versions for conflicts
- Verify VSCE_PAT secret is correctly configured
- Check marketplace publishing permissions
- Review pre-deployment validation results
- Verify version numbering conventions
- Check test environment setup
- Review test dependencies and versions
- Verify VS Code installation for extension tests
- Check platform-specific requirements
Enable debug mode by setting:
DEBUG: vscode-live-server:*- All changes require passing CI pipeline
- PRs must include test coverage
- Code must pass linting and type checking
- Documentation updates required for new features
- Test pipeline changes locally first
- Update documentation for any workflow changes
- Consider impact on CI/CD performance
- Maintain backward compatibility when possible
For pipeline issues:
- Check the Actions tab for detailed logs
- Review artifacts for test reports and debug information
- Create an issue with pipeline label for bugs
- Use enhancement label for feature requests
Last Updated: $(date) Pipeline Version: 1.0.0 Maintained by: Development Team