This directory contains the complete CI/CD pipeline configuration for LightningMD, including GitHub Actions workflows, issue templates, and automation tools.
The CI/CD pipeline provides:
- Continuous Integration: Multi-platform testing, code quality checks, and security scanning
- Release Automation: Automated versioning, building, and publishing
- Security: Comprehensive security auditing and vulnerability scanning
- Performance: Automated benchmarking and regression detection
- Documentation: Automated documentation building and deployment
- Maintenance: Automated dependency updates and issue management
- Triggers: Push/PR to main branches, daily schedule
- Features:
- Multi-platform testing (Linux, macOS, Windows)
- Multiple Rust versions (stable, beta, nightly)
- Code formatting and linting (rustfmt, clippy)
- WebAssembly build validation
- Test coverage reporting
- Feature combination testing
- Cross-compilation verification
- MSRV (Minimum Supported Rust Version) checks
- Triggers: Git tags (v*), manual dispatch
- Features:
- Automated changelog generation
- Multi-platform binary builds
- WASM package publishing to NPM
- Crates.io publishing
- Docker image building and pushing
- GitHub release creation with assets
- Triggers: Push/PR, daily schedule, manual dispatch
- Features:
- Cargo audit for dependency vulnerabilities
- License compatibility checking
- WASM security analysis
- CodeQL static analysis
- Semgrep security scanning
- Supply chain security with cargo-deny
- Secret scanning with TruffleHog
- Triggers: Push/PR, weekly schedule, manual dispatch
- Features:
- Rust criterion benchmarks
- CLI performance testing with hyperfine
- WASM performance benchmarks
- Memory usage profiling with Valgrind
- Parser comparison benchmarks
- Performance regression detection
- Triggers: Push/PR affecting docs or source, manual dispatch
- Features:
- Rust API documentation building
- Markdown linting and link checking
- Documentation accessibility testing
- Performance auditing with Lighthouse
- GitHub Pages deployment
- Ecosystems: Cargo, npm, GitHub Actions, Docker
- Schedule: Weekly updates on Mondays
- Features:
- Grouped dependency updates
- Ignore policies for major versions
- Automatic labeling and assignment
- Structured form for bug reporting
- Environment and reproduction information
- Sample input/output collection
- Pre-submission checklist
- Detailed feature proposal form
- Use case and priority assessment
- Implementation complexity estimation
- Contribution interest tracking
- Performance problem reporting
- Benchmarking data collection
- Comparison with other tools
- Profiling information gathering
- Links to documentation and discussions
- Security vulnerability reporting guidance
- Blank issues disabled for better organization
- Comprehensive PR description format
- Testing and compatibility checklists
- Breaking change documentation
- Security consideration assessment
- Supported versions matrix
- Private vulnerability reporting process
- Response timeline commitments
- Security best practices for users
- Coordinated disclosure policy
- Multi-stage build for optimized images
- Security-focused runtime environment
- Non-root user execution
- Health checks and proper labeling
To fully utilize the CI/CD pipeline, configure these GitHub secrets:
GITHUB_TOKEN: Automatically provided by GitHubCARGO_REGISTRY_TOKEN: For publishing to crates.ioNPM_TOKEN: For publishing WASM package to npm
CODECOV_TOKEN: For coverage reportingSEMGREP_APP_TOKEN: For enhanced security scanningDOCKER_USERNAME: For Docker Hub publishingDOCKER_PASSWORD: For Docker Hub publishing
| Workflow | Badge |
|---|---|
| CI | |
| Security | |
| Benchmarks | |
| Docs |
# Trigger security audit
gh workflow run security.yml
# Trigger benchmarks with comparison
gh workflow run benchmark.yml -f compare_with=v0.1.0
# Trigger release (requires tag)
git tag v0.1.1
git push origin v0.1.1- Update
Cargo.tomlversion - Update
CHANGELOG.md - Create and push git tag:
git tag v0.1.1 && git push origin v0.1.1 - Release workflow automatically builds and publishes
- Benchmark results are stored in GitHub Pages
- Performance regressions trigger alerts
- Memory usage is tracked over time
- Daily security scans
- Dependency vulnerability alerts
- Automated security updates via Dependabot
- Create
.github/workflows/your-workflow.yml - Follow existing patterns for caching and security
- Add appropriate triggers and permissions
- Update this README
- Edit files in
ISSUE_TEMPLATE/orPULL_REQUEST_TEMPLATE.md - Test with GitHub's template preview
- Update documentation as needed
- Modify
security.ymlworkflow - Update
SECURITY.mdpolicy - Configure appropriate secrets
- Test with non-production repositories
- Use caching for dependencies and build artifacts
- Implement proper error handling and cleanup
- Follow principle of least privilege for permissions
- Use matrix builds for multi-platform support
- Never expose secrets in workflow logs
- Use read-only tokens when possible
- Implement security scanning in all workflows
- Keep dependencies updated automatically
- Cache aggressively but invalidate appropriately
- Use parallel jobs where possible
- Optimize for common use cases
- Monitor resource usage and costs
- Check required secrets are configured
- Verify branch protection rules
- Review workflow permissions
- Check for rate limiting issues
- Ensure version numbers are properly formatted
- Check that all required tokens are valid
- Verify publishing permissions
- Review changelog generation
- Review new vulnerabilities in dependencies
- Check for false positives in scanning tools
- Verify security policy compliance
- Update ignore lists if necessary
- Check workflow run logs for detailed error messages
- Review GitHub Actions documentation
- Open an issue using the appropriate template
- Contact maintainers via discussions
This CI/CD pipeline is designed to grow with the project. Feel free to suggest improvements or report issues!