Monorepo Example
Complex setup for monorepos with multiple Python services, featuring dynamic service discovery.
Project Structure
Monorepo Directory Structure
monorepo/
├── services/
│ ├── api/
│ │ └── requirements.txt
│ ├── worker/
│ │ └── requirements.txt
│ └── scheduler/
│ └── requirements.txt
└── .github/workflows/
└── monorepo-security.yml
Workflow File
Advanced Features
- Dynamic service discovery using
find
command - Two-job workflow with dependency between jobs
- Matrix strategy for parallel execution per service
- Separate artifacts for each service
- Flexible service structure - automatically detects new services
Use Case
Perfect for:
- Large monorepos with multiple Python services
- Microservices architecture in a single repository
- Organizations with many small Python applications
- Projects where services are added/removed frequently