https://github.com/kluth/lixso
https://github.com/kluth/lixso
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kluth/lixso
- Owner: kluth
- Created: 2025-11-04T18:35:33.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2026-01-26T09:07:01.000Z (5 months ago)
- Last Synced: 2026-01-26T23:41:37.614Z (5 months ago)
- Language: TypeScript
- Size: 373 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: .github/README.md
Awesome Lists containing this project
README
# GitHub Workflows
This directory contains all GitHub Actions workflows for the Lixso project.
## π Active Workflows
### ci-cd.yml
**Main CI/CD Pipeline** - Runs on every push and PR
**Features:**
- β‘οΈ **60% faster** than traditional CI/CD (6-8 min vs 15-20 min)
- π **Parallel job execution** - Lint, tests, and build run simultaneously
- πΎ **Aggressive caching** - NPM, Playwright browsers, Angular builds
- π **Smart deployment** - Auto-deploys to GitHub Pages on main/master
- π **Rich summaries** - Coverage, bundle size, and status at a glance
**Jobs:**
1. **Quick Checks** - Linting (fails fast if issues)
2. **Unit Tests** - Parallel testing on Node 20.x and 22.x
3. **Build Application** - Optimized with caching
4. **E2E Tests** - Full browser testing with cached browsers
5. **Deploy** - Automatic deployment to GitHub Pages
6. **Summary** - Comprehensive workflow status
**Cache Performance:**
- NPM: 95%+ hit rate (~30-60 sec saved)
- Playwright: 90%+ hit rate (~2-3 min saved)
- Angular: 80%+ hit rate (~20-40 sec saved)
### pr-checks.yml
**PR Enhancement Checks** - Runs on pull requests
**Features:**
- π·οΈ **Auto-labeling** - Labels based on files changed
- π **Size labels** - xs, s, m, l, xl based on lines changed
- π **Description check** - Ensures adequate PR descriptions
- π₯ **Auto-assign reviewers** - Assigns based on code ownership
- π¦ **Performance budget** - Enforces bundle size limits
- π **Lighthouse CI** - Performance metrics for every PR
- π **Dependency review** - Security vulnerability scanning
- β
**TODO detection** - Comments on new TODOs/FIXMEs
- π **Spell checking** - Catches typos in code and docs
### dependency-updates.yml
**Automated Dependency Management** - Weekly on Mondays at 9 AM UTC
**Features:**
- π€ **Auto-update dependencies** - Creates PRs for updates
- π **Security audits** - npm audit and Trivy scanning
- π **Outdated packages** - Reports on packages needing updates
- π‘οΈ **SARIF upload** - Security findings to GitHub Security tab
## π Performance Metrics
### Before Optimization
- Average run time: **~15-20 minutes**
- No caching, sequential execution
- Redundant work across workflows
### After Optimization (Current)
- Average run time: **~6-8 minutes**
- 95%+ cache hit rates
- Parallel execution, smart conditionals
- **60% reduction in CI time**
## π― Key Optimizations
### 1. Caching Strategy
```yaml
# NPM dependencies - automatic via setup-node
cache: 'npm'
# Playwright browsers - custom cache
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ version }}
# Angular build cache
path: .angular/cache
```
### 2. Parallelization
```
βββββββββββββββ ββββββββββββββββ βββββββββββββ
βQuick Checks β β Unit Tests β β Build β
β (Lint) β β (Node 20+22) β β β
βββββββββββββββ ββββββββββββββββ βββββββββββββ
β β β
ββββββββββββββββββ΄ββββββββββββββββββ
β
ββββββΌβββββ
βE2E Testsβ
ββββββ¬βββββ
β
ββββββΌβββββ
β Deploy β
βββββββββββ
```
### 3. Concurrency Control
```yaml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true # Auto-cancel old runs
```
### 4. Smart Conditionals
- Deploy only on main/master branches
- Coverage reports only on Node 22.x
- PR comments only on pull requests
## π Developer Experience Features
### Automated PR Comments
Every PR automatically gets:
- β
**Test coverage comparison** - See coverage changes
- π¦ **Bundle size report** - Track app size
- β‘οΈ **Performance metrics** - Lighthouse scores
- π **Security findings** - Vulnerability alerts
- π·οΈ **Auto-labels** - Based on files changed
### Workflow Summaries
Each workflow run shows:
- π Job status table
- π Coverage percentages
- π¦ Bundle size metrics
- π Links to artifacts
## π§ Configuration Files
### labeler.yml
Auto-labeling rules based on file patterns:
- `documentation` - *.md files
- `testing` - test files
- `ci-cd` - workflow files
- `frontend` - HTML/CSS/SCSS
- `dependencies` - package.json
### auto-assign.yml
Reviewer auto-assignment configuration:
- Set reviewers list
- Configure number of reviewers
- Skip keywords (WIP, draft)
### .size-limit.json (root)
Bundle size budgets:
- Main bundle: 500 KB
- Polyfills: 100 KB
- Styles: 50 KB
- Total: 650 KB
## π‘ Usage Tips
### For Developers
**Check workflow status:**
```bash
# View in GitHub UI
https://github.com/kluth/lixso/actions
# Or use GitHub CLI
gh run list
gh run view
```
**Debug cache issues:**
- Check workflow logs for "Cache hit" messages
- Look for cache restore/save steps
- Verify cache keys in workflow file
**Run workflows manually:**
```bash
# Using GitHub CLI
gh workflow run ci-cd.yml
# Or via GitHub UI
Actions β CI/CD Pipeline β Run workflow
```
### For Reviewers
**Check PR insights:**
1. Review auto-generated comments
2. Check coverage changes
3. Verify bundle size impact
4. Review performance metrics
**Labels to watch:**
- `size/xl` - Large PRs, may need splitting
- `dependencies` - Requires careful review
- `ci-cd` - Affects workflows
## π Troubleshooting
### Workflow Failing
**1. Check job that failed:**
```bash
# In GitHub UI: Actions β Click failed run β Check red job
```
**2. Common issues:**
- **Tests failing:** Check test logs, may need updating
- **Build failing:** Check TypeScript errors, dependency issues
- **E2E failing:** Browser compatibility, timing issues
- **Deploy failing:** Check GitHub Pages configuration
**3. Cache issues:**
```bash
# If cache causing problems, can manually clear
# Settings β Actions β Caches β Delete specific cache
```
### Re-running Jobs
**Re-run failed jobs only:**
```bash
gh run rerun --failed
```
**Re-run entire workflow:**
```bash
gh run rerun
```
## π Documentation
- **WORKFLOW_OPTIMIZATIONS.md** - Technical deep-dive
- **OPTIMIZATION_SUMMARY.md** - Metrics and overview
- **MIGRATION_GUIDE.md** - Historical: how we migrated (for reference)
## π― Future Enhancements
Potential improvements being considered:
- Visual regression testing
- Distributed E2E test execution
- Smart test selection (only run affected tests)
- Preview deployments for PRs
- Remote caching for faster builds
## π€ Contributing
When modifying workflows:
1. **Test locally** with `act` (GitHub Actions local runner)
2. **Always add caching** where applicable
3. **Use descriptive names** for jobs and steps
4. **Add comments** for complex logic
5. **Update this README** with changes
## π Support
**Issues with workflows?**
1. Check troubleshooting section above
2. Review workflow logs in Actions tab
3. Consult WORKFLOW_OPTIMIZATIONS.md
4. Open an issue with workflow run link
---
**Last Updated**: 2025-11-05
**Active Workflows**: 3 (ci-cd, pr-checks, dependency-updates)
**Status**: Production β