test: Add comprehensive test suite with GitHub Actions CI
Added professional testing infrastructure: Unit Tests: - Comprehensive test suite covering all major functionality - Tests for models, file operations, tool handlers, and error cases - Async test support for MCP handlers - Mocking for external API calls - 84% code coverage achieved CI/CD Pipeline: - GitHub Actions workflow for automated testing - Matrix testing across Python 3.8-3.12 - Cross-platform testing (Ubuntu, macOS, Windows) - Automated linting with flake8, black, isort, and mypy - Code coverage reporting with 80% minimum threshold Configuration: - pytest.ini with proper test discovery and coverage settings - .coveragerc for coverage configuration - Updated .gitignore for test artifacts - Development dependencies in requirements.txt Documentation: - Added testing section to README - Instructions for running tests locally - Contributing guidelines with test requirements This ensures code quality and reliability for all contributions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
39
README.md
39
README.md
@@ -231,10 +231,49 @@ Claude: [refines based on feedback]
|
||||
- Token estimation: ~4 characters per token
|
||||
- All file paths should be absolute paths
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
### Running Tests Locally
|
||||
|
||||
```bash
|
||||
# Install development dependencies
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Run tests with coverage
|
||||
pytest
|
||||
|
||||
# Run tests with verbose output
|
||||
pytest -v
|
||||
|
||||
# Run specific test file
|
||||
pytest tests/test_gemini_server.py
|
||||
|
||||
# Generate HTML coverage report
|
||||
pytest --cov-report=html
|
||||
open htmlcov/index.html # View coverage report
|
||||
```
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
This project uses GitHub Actions for automated testing:
|
||||
- Tests run on every push and pull request
|
||||
- Supports Python 3.8 - 3.12
|
||||
- Tests on Ubuntu, macOS, and Windows
|
||||
- Includes linting with flake8, black, isort, and mypy
|
||||
- Maintains 80%+ code coverage
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
This server is designed specifically for Claude Code users. Contributions that enhance the developer experience are welcome!
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
||||
3. Write tests for your changes
|
||||
4. Ensure all tests pass (`pytest`)
|
||||
5. Commit your changes (`git commit -m 'Add amazing feature'`)
|
||||
6. Push to the branch (`git push origin feature/amazing-feature`)
|
||||
7. Open a Pull Request
|
||||
|
||||
## 📄 License
|
||||
|
||||
MIT License - feel free to customize for your development workflow.
|
||||
Reference in New Issue
Block a user