ci cd quickref
Quick commands and workflows for common CI/CD tasks.
Running CI Checks Locally
Section titled “Running CI Checks Locally”Before pushing code, run the same checks that CI runs:
# Full CI suitemake test # Run all testsmake test-race # Run tests with race detectormake lint # Run lintingmake build # Build all componentsmake coverage # Generate coverage report
# Individual componentscd runtime && go test ./...cd sdk && go test ./...cd tools/arena && go test ./...Checking CI Status
Section titled “Checking CI Status”View Current Runs
Section titled “View Current Runs”# Using GitHub CLIgh run list --limit 10
# View specific workflowgh run list --workflow=ci.yml
# Watch a run in progressgh run watchView Logs
Section titled “View Logs”# Get latest run logsgh run view --log
# Get specific rungh run view <run-id> --log
# Download logsgh run download <run-id>Triggering Workflows
Section titled “Triggering Workflows”Manual Trigger (Documentation)
Section titled “Manual Trigger (Documentation)”# Trigger docs build manuallygh workflow run docs.ymlRelease Test Workflow
Section titled “Release Test Workflow”# Test arena releasegh workflow run release-test.yml -f tool=arena -f version=v0.0.1-test
# Test packc releasegh workflow run release-test.yml -f tool=packc -f version=v0.0.1-testCommon CI Issues & Fixes
Section titled “Common CI Issues & Fixes”Test Failures
Section titled “Test Failures”Issue: Tests fail on CI but pass locally
# Run with same conditions as CIgo test -race -v ./...
# Check for timing issuesgo test -count=10 ./...Coverage Issues
Section titled “Coverage Issues”Issue: Coverage report not generated
# Generate locally to debugmake coverage
# Check merged coveragecat coverage.out | head -20Linting Failures
Section titled “Linting Failures”Issue: Linter catches issues
# Run all linters locallymake lint
# Auto-fix formattinggo fmt ./...
# Check specific issuesgo vet ./...golangci-lint runBuild Failures
Section titled “Build Failures”Issue: Build fails on CI
# Clean and rebuildmake cleanmake build
# Check for workspace sync issuesgo work syncSonarCloud Integration
Section titled “SonarCloud Integration”Viewing Results
Section titled “Viewing Results”- Dashboard: https://sonarcloud.io/project/overview?id=AltairaLabs_PromptKit
- Coverage: Check “Coverage” tab
- Quality Gate: View overall project quality
Local Analysis
Section titled “Local Analysis”# Run SonarScanner locally (requires SONAR_TOKEN)export SONAR_TOKEN=your_token_heremake sonar-scan
# Quick check: coverage + sonarmake sonar-quickDocumentation Pipeline
Section titled “Documentation Pipeline”Testing Docs Locally
Section titled “Testing Docs Locally”# Install Jekyll dependencies (first time)cd docsgem install bundlerbundle install
# Serve locallybundle exec jekyll serve
# View at: http://localhost:4000Forcing Docs Rebuild
Section titled “Forcing Docs Rebuild”# Trigger manual deploygh workflow run docs.yml
# Or push a docs changeecho "<!-- trigger -->" >> docs/README.mdgit add docs/README.mdgit commit -m "docs: trigger rebuild"git pushRelease Testing
Section titled “Release Testing”Safe Local Test
Section titled “Safe Local Test”# Dry run - no git changes./scripts/test-release.sh arena v0.0.1-test
# Review output, no files modifiedgit status # Should show no changesGitHub Actions Test
Section titled “GitHub Actions Test”# Create test branchgit checkout -b release-test/my-testgit push origin release-test/my-test
# Watch workflowgh run watch
# Clean upgit push origin --delete release-test/my-testgit checkout maingit branch -d release-test/my-testMonitoring & Debugging
Section titled “Monitoring & Debugging”Check Workflow Status
Section titled “Check Workflow Status”# List recent runs with statusgh run list --limit 20
# Show only failuresgh run list --status failure
# Watch specific workflowgh run watch --workflow=ci.ymlDownload Artifacts
Section titled “Download Artifacts”# List artifacts from a rungh run view <run-id> --json artifacts
# Download specific artifactgh run download <run-id> -n release-checklistRe-run Failed Jobs
Section titled “Re-run Failed Jobs”# Re-run failed jobs onlygh run rerun <run-id> --failed
# Re-run entire workflowgh run rerun <run-id>Quality Metrics
Section titled “Quality Metrics”Check Coverage
Section titled “Check Coverage”# Generate and view coverage locallymake coveragego tool cover -html=coverage.outView Test Results
Section titled “View Test Results”After CI run:
- Go to Actions tab
- Click on workflow run
- Click “Test Results” or “Coverage Test Results”
- View detailed test report
Code Quality
Section titled “Code Quality”- Go Report Card: https://goreportcard.com/report/github.com/AltairaLabs/PromptKit
- SonarCloud: https://sonarcloud.io/project/overview?id=AltairaLabs_PromptKit
Emergency Procedures
Section titled “Emergency Procedures”CI is Down
Section titled “CI is Down”- Check GitHub Status: https://www.githubstatus.com/
- Run tests locally:
make test-race - If urgent, can bypass with admin approval
- Document in PR why CI was bypassed
False Positive in Linter
Section titled “False Positive in Linter”# Disable specific rule (use sparingly)//nolint:rulename
# Document why in comment// nolint:staticcheck // SA1019: using deprecated method for compatibilityBroken Main Branch
Section titled “Broken Main Branch”- Identify breaking commit
- Revert or fix forward
- Create hotfix PR
- Fast-track review
# Revert last commitgit revert HEADgit push origin main
# Or fix forwardgit checkout -b hotfix/fix-ci# make fixesgit push origin hotfix/fix-ci# create PRUseful GitHub CLI Commands
Section titled “Useful GitHub CLI Commands”# Install GitHub CLIbrew install gh # macOS# or visit: https://cli.github.com/
# Authenticategh auth login
# Common commandsgh pr status # Check PR statusgh pr checks # View CI checks on current PRgh run list # List workflow runsgh run view # View run detailsgh workflow list # List all workflowsConfiguration Files
Section titled “Configuration Files”Key files for CI/CD:
.github/workflows/├── ci.yml # Main CI pipeline├── docs.yml # Documentation deployment└── release-test.yml # Release testing
Makefile # Local build commandssonar-project.properties # SonarCloud configcodecov.yml # Coverage config (if used).golangci.yml # Linter configurationFurther Reading
Section titled “Further Reading”- CI/CD Pipeline Documentation - Detailed pipeline documentation
- Testing Releases - Release workflow
- GitHub Actions Docs - Official documentation
- SonarCloud Docs - Code quality analysis
Last Updated: 2 November 2025