|
| 1 | +# GitHub Actions Workflows |
| 2 | + |
| 3 | +This directory contains GitHub Actions workflows for the Maestro CLI project. |
| 4 | + |
| 5 | +## Workflows |
| 6 | + |
| 7 | +### 1. `ci.yml` - Main CI Pipeline |
| 8 | +- **Triggers**: Push to main/develop, PRs to main/develop, manual dispatch |
| 9 | +- **Jobs**: |
| 10 | + - `lint`: Runs code quality checks |
| 11 | + - `build`: Builds the maestro CLI binary |
| 12 | + - `test`: Runs all tests |
| 13 | + - `release-build`: Creates release artifacts for main branch pushes |
| 14 | +- **Matrix**: Tests on multiple Go versions and operating systems |
| 15 | + |
| 16 | +### 2. `lint.yml` - Code Quality |
| 17 | +- **Triggers**: Push to main/develop, PRs to main/develop, manual dispatch |
| 18 | +- **Purpose**: Runs `./tools/lint.sh` for code quality checks |
| 19 | +- **Artifacts**: Uploads lint results on failure |
| 20 | + |
| 21 | +### 3. `build.yml` - Build Verification |
| 22 | +- **Triggers**: Push to main/develop, PRs to main/develop, manual dispatch |
| 23 | +- **Purpose**: Runs `./build.sh` and verifies binary functionality |
| 24 | +- **Matrix**: Tests on Go 1.21, 1.22, and 1.23 |
| 25 | +- **Artifacts**: Uploads build artifacts and logs |
| 26 | + |
| 27 | +### 4. `test.yml` - Test Suite |
| 28 | +- **Triggers**: Push to main/develop, PRs to main/develop, manual dispatch |
| 29 | +- **Purpose**: Runs `./test.sh` for comprehensive testing |
| 30 | +- **Matrix**: Tests on Go 1.21, 1.22, and 1.23 |
| 31 | +- **Artifacts**: Uploads test results and coverage reports |
| 32 | + |
| 33 | +## Workflow Features |
| 34 | + |
| 35 | +- **Parallel Execution**: Individual workflows can run in parallel |
| 36 | +- **Sequential Dependencies**: Main CI workflow runs jobs in sequence (lint → build → test) |
| 37 | +- **Matrix Testing**: Tests across multiple Go versions |
| 38 | +- **Artifact Upload**: Build artifacts and test results are preserved |
| 39 | +- **Cross-Platform**: Release builds for Ubuntu, Windows, and macOS |
| 40 | +- **Manual Triggers**: All workflows support manual dispatch |
| 41 | + |
| 42 | +## Status Badges |
| 43 | + |
| 44 | +Add these badges to your README.md: |
| 45 | + |
| 46 | +```markdown |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +``` |
| 52 | + |
| 53 | +## Local Development |
| 54 | + |
| 55 | +To run the same checks locally: |
| 56 | + |
| 57 | +```bash |
| 58 | +# Run all checks |
| 59 | +./tools/lint.sh && ./build.sh && ./test.sh |
| 60 | + |
| 61 | +# Run individual checks |
| 62 | +./tools/lint.sh # Code quality |
| 63 | +./build.sh # Build verification |
| 64 | +./test.sh # Test suite |
| 65 | +``` |
| 66 | + |
| 67 | +## Workflow Configuration |
| 68 | + |
| 69 | +- **Go Version**: Primary testing on Go 1.21, with matrix testing on 1.22 and 1.23 |
| 70 | +- **Operating Systems**: Ubuntu (primary), Windows and macOS (release builds) |
| 71 | +- **Artifact Retention**: 7 days for logs, 30 days for test results, 90 days for releases |
| 72 | +- **Cache**: Go module cache is enabled for faster builds |
0 commit comments