|
| 1 | +# GitHub Actions Quick Reference |
| 2 | + |
| 3 | +## Quick Commands |
| 4 | + |
| 5 | +### View Workflow Status |
| 6 | +```bash |
| 7 | +# Via GitHub CLI |
| 8 | +gh run list --limit 10 |
| 9 | +gh run view <run-id> |
| 10 | +gh run watch # Watch current run |
| 11 | +``` |
| 12 | + |
| 13 | +### Trigger Manual Workflow |
| 14 | +```bash |
| 15 | +gh workflow run "CI Pipeline" |
| 16 | +gh workflow run "Performance Tests" |
| 17 | +gh workflow run "Nightly Build" |
| 18 | +``` |
| 19 | + |
| 20 | +### View Logs |
| 21 | +```bash |
| 22 | +gh run view <run-id> --log |
| 23 | +gh run view <run-id> --log-failed # Only failed steps |
| 24 | +``` |
| 25 | + |
| 26 | +## Workflow Triggers Quick Reference |
| 27 | + |
| 28 | +| Workflow | Auto Trigger | Manual | Schedule | |
| 29 | +|----------|--------------|--------|----------| |
| 30 | +| ci-pipeline | ✓ (push/PR) | ✓ | - | |
| 31 | +| elisp-lint | ✓ (push/PR) | - | - | |
| 32 | +| elisp-compile | ✓ (push/PR) | - | - | |
| 33 | +| elisp-test | ✓ (push/PR) | - | - | |
| 34 | +| org-mode-validation | ✓ (push/PR) | - | - | |
| 35 | +| javascript-ci | ✓ (push/PR) | - | - | |
| 36 | +| security-scan | ✓ (push/PR) | - | Daily 2 AM UTC | |
| 37 | +| documentation-check | ✓ (push/PR) | - | - | |
| 38 | +| code-quality | ✓ (push/PR) | - | - | |
| 39 | +| dependency-updates | - | ✓ | Mon 9 AM UTC | |
| 40 | +| nightly-build | - | ✓ | Daily 2 AM UTC | |
| 41 | +| performance-tests | ✓ (push/PR) | ✓ | Sun 12 AM UTC | |
| 42 | +| release | ✓ (tags) | ✓ | - | |
| 43 | +| test (legacy) | ✓ (push/PR) | - | - | |
| 44 | + |
| 45 | +## File Patterns That Trigger Workflows |
| 46 | + |
| 47 | +### Elisp Workflows |
| 48 | +- `*.el` → elisp-lint, elisp-compile, elisp-test |
| 49 | +- `test/**` → elisp-test |
| 50 | +- `Cask` → elisp-compile, elisp-test |
| 51 | + |
| 52 | +### Org Workflows |
| 53 | +- `*.org` → org-mode-validation, documentation-check |
| 54 | + |
| 55 | +### JavaScript Workflows |
| 56 | +- `src/**` → javascript-ci |
| 57 | +- `package.json`, `package-lock.json` → javascript-ci |
| 58 | +- `vite.config.js`, `tailwind.config.js` → javascript-ci |
| 59 | + |
| 60 | +### Documentation Workflows |
| 61 | +- `README*`, `CHANGELOG*` → documentation-check |
| 62 | +- `demos/**` → documentation-check |
| 63 | + |
| 64 | +## Common Workflow Commands |
| 65 | + |
| 66 | +### Local Testing |
| 67 | + |
| 68 | +```bash |
| 69 | +# Validate YAML |
| 70 | +python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci-pipeline.yml'))" |
| 71 | + |
| 72 | +# Test Elisp |
| 73 | +cask install |
| 74 | +cask emacs --batch -f batch-byte-compile *.el |
| 75 | +cask exec ert-runner |
| 76 | + |
| 77 | +# Test JavaScript |
| 78 | +npm ci |
| 79 | +npm run build |
| 80 | +npm test |
| 81 | + |
| 82 | +# Test Org |
| 83 | +cask emacs --batch --eval "(require 'org)" --eval "(find-file \"README.org\")" |
| 84 | +``` |
| 85 | + |
| 86 | +## Status Badge URLs |
| 87 | + |
| 88 | +```markdown |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | +``` |
| 95 | + |
| 96 | +## Troubleshooting Quick Fixes |
| 97 | + |
| 98 | +### Cask Issues |
| 99 | +```bash |
| 100 | +# Clear cache and reinstall |
| 101 | +rm -rf .cask |
| 102 | +cask install |
| 103 | +``` |
| 104 | + |
| 105 | +### NPM Issues |
| 106 | +```bash |
| 107 | +# Clear cache and reinstall |
| 108 | +rm -rf node_modules package-lock.json |
| 109 | +npm install |
| 110 | +``` |
| 111 | + |
| 112 | +### Test Failures |
| 113 | +```bash |
| 114 | +# Run specific test |
| 115 | +cask emacs --batch -L . -l test/aichat-util-test.el -f ert-run-tests-batch-and-exit |
| 116 | +``` |
| 117 | + |
| 118 | +### Build Issues |
| 119 | +```bash |
| 120 | +# Clean build |
| 121 | +rm -rf dist |
| 122 | +npm run build |
| 123 | +``` |
| 124 | + |
| 125 | +## Workflow File Locations |
| 126 | + |
| 127 | +``` |
| 128 | +.github/workflows/ |
| 129 | +├── README.md # Full documentation |
| 130 | +├── TESTING.md # Testing guide |
| 131 | +├── ci-pipeline.yml # Main orchestration |
| 132 | +├── elisp-lint.yml # Elisp linting |
| 133 | +├── elisp-compile.yml # Byte compilation |
| 134 | +├── elisp-test.yml # Unit tests |
| 135 | +├── org-mode-validation.yml # Org validation |
| 136 | +├── javascript-ci.yml # JS build/test |
| 137 | +├── security-scan.yml # Security checks |
| 138 | +├── documentation-check.yml # Doc validation |
| 139 | +├── code-quality.yml # Quality metrics |
| 140 | +├── dependency-updates.yml # Dep management |
| 141 | +├── nightly-build.yml # Nightly builds |
| 142 | +├── performance-tests.yml # Benchmarks |
| 143 | +├── release.yml # Releases |
| 144 | +└── test.yml # Legacy tests |
| 145 | +``` |
| 146 | + |
| 147 | +## Matrix Configurations |
| 148 | + |
| 149 | +### Emacs Versions |
| 150 | +- 27.2 (older LTS) |
| 151 | +- 28.2 (previous stable) |
| 152 | +- 29.1 (current stable) |
| 153 | + |
| 154 | +### Node.js Versions |
| 155 | +- 18.x (older LTS) |
| 156 | +- 20.x (current LTS) |
| 157 | + |
| 158 | +### Operating Systems |
| 159 | +- ubuntu-latest (primary) |
| 160 | +- macos-latest (nightly only) |
| 161 | + |
| 162 | +## Artifact Retention |
| 163 | + |
| 164 | +| Type | Days | Workflow | |
| 165 | +|------|------|----------| |
| 166 | +| Compiled Elisp | 7 | elisp-compile | |
| 167 | +| Test Results | 30 | elisp-test | |
| 168 | +| Build Artifacts | 7 | javascript-ci | |
| 169 | +| Coverage | 30 | elisp-test, javascript-ci | |
| 170 | +| HTML Exports | 7 | org-mode-validation | |
| 171 | +| Reports | 30 | documentation-check, code-quality | |
| 172 | +| Performance | 90 | performance-tests | |
| 173 | +| Nightly Builds | 7 | nightly-build | |
| 174 | + |
| 175 | +## Emergency Actions |
| 176 | + |
| 177 | +### Disable a Workflow |
| 178 | +1. Go to Actions tab |
| 179 | +2. Select workflow |
| 180 | +3. Click "..." menu |
| 181 | +4. Select "Disable workflow" |
| 182 | + |
| 183 | +### Cancel Running Workflows |
| 184 | +```bash |
| 185 | +gh run cancel <run-id> |
| 186 | +# Or via UI: Actions → Run → Cancel workflow |
| 187 | +``` |
| 188 | + |
| 189 | +### Re-run Failed Jobs |
| 190 | +```bash |
| 191 | +gh run rerun <run-id> |
| 192 | +gh run rerun <run-id> --failed # Only failed jobs |
| 193 | +``` |
| 194 | + |
| 195 | +## Best Practices Checklist |
| 196 | + |
| 197 | +- [ ] Test locally before pushing |
| 198 | +- [ ] Use descriptive commit messages |
| 199 | +- [ ] Check workflow status after push |
| 200 | +- [ ] Review logs if workflows fail |
| 201 | +- [ ] Keep workflows up to date |
| 202 | +- [ ] Monitor scheduled workflows |
| 203 | +- [ ] Clean up old artifacts |
| 204 | +- [ ] Document workflow changes |
| 205 | + |
| 206 | +## Need Help? |
| 207 | + |
| 208 | +1. Check [TESTING.md](TESTING.md) for detailed testing guide |
| 209 | +2. Check [README.md](README.md) for full documentation |
| 210 | +3. Review workflow logs |
| 211 | +4. Search existing issues |
| 212 | +5. Create new issue with details |
0 commit comments