A newer version of the Gradio SDK is available:
6.1.0
CI Pipeline Setup Guide
π Current Status
β
Simplified CI - ci.yml (Active)
- No external dependencies required
- Runs on all PRs and pushes to main/develop
- Core testing, linting, and validation
βΈοΈ Full CI - ci-full.yml (Disabled)
- Includes Codecov integration
- Manual trigger only until secrets are configured
βΈοΈ HF Deployment - deploy_space.yml (Disabled)
- Manual trigger only until HF secrets are configured
β
Documentation - docs.yml (Active)
- Works without external dependencies
β
GitHub Flow - github-flow.yml (Active)
- Branch management and flow automation
π Simplified CI Pipeline Features
The current active pipeline (ci.yml) includes:
Core Testing Jobs
- Unit Tests - pytest with coverage reporting
- Integration Tests - e2e tests and task management validation
- Code Quality - ruff linting, black formatting, mypy type checking
- Security - basic bandit security scanning
- Structure Validation - project file and directory checks
- PR Checks - title format and branch naming validation
Key Benefits
- β No external secrets required
- β Fast feedback loop
- β Comprehensive testing
- β Local artifact uploads for coverage and security reports
- β Graceful degradation (warnings instead of failures for non-critical checks)
Artifacts Generated
- Coverage reports (HTML format, 7-day retention)
- Security scan reports (JSON format, 7-day retention)
π§ When You're Ready to Enable Full Features
1. Enable Codecov Integration
Add these secrets to your repository settings:
CODECOV_TOKEN- Get from codecov.io
Then uncomment the triggers in ci-full.yml:
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
types: [opened, synchronize, reopened, ready_for_review]
2. Enable HF Deployment
Add these secrets to your repository settings:
HF_TOKEN- Your Hugging Face API tokenHF_USERNAME- Your Hugging Face username
Then uncomment the triggers in deploy_space.yml:
on:
push:
branches: [ main ]
workflow_dispatch:
3. Optional: Add Variables
In your repository settings, you can add these variables:
HF_SPACE_NAME- Custom space name (defaults to 'kgraph-mcp-demo')
π§ͺ Testing the Current Setup
To test the simplified pipeline:
Create a test branch:
just task-branch 999 # or manually: git checkout -b feat/999_test_ci_pipelineMake a small change and push:
echo "# Test CI" >> test_ci.md git add test_ci.md git commit -m "test: verify simplified CI pipeline" git push -u origin feat/999_test_ci_pipelineCreate a PR:
just commit-and-pr # or manually with gh CLIMonitor the workflow runs in GitHub Actions tab
π Expected Workflow Results
The simplified CI should complete successfully with:
- β Unit tests passing
- β Code quality checks passing
- β Basic security scan completing
- β Project structure validation passing
- β Coverage and security reports uploaded as artifacts
π¨ Troubleshooting
Common Issues
- Python setup fails - Check if requirements.txt exists
- Tests fail - Review test logs and ensure test files exist
- Linting fails - Run
just lintlocally first - Structure validation fails - Ensure all required files/directories exist
Quick Fixes
# Fix most issues locally first
just setup # Setup environment
just check # Run all checks
just pre-commit # Pre-commit validation
π Next Steps
- Test the simplified pipeline with a small PR
- Add required secrets when ready for full features
- Monitor initial runs for any remaining issues
- Gradually enable additional features (Codecov, HF deployment)
The simplified pipeline gives you immediate CI/CD capability while you set up the external integrations at your own pace.