# Local CI/CD Testing This guide helps you test CI/CD workflows locally before pushing to the repository. ## Prerequisites - Docker with Buildx support - uv package manager - Python 3.8+ ## Local Testing Commands ```bash # Test local build make docker-build # Test multi-arch build make docker-buildx-local # Test full development workflow make dev # Run health checks ./scripts/health_check.sh ``` ## Workflow Testing Use `act` to test GitHub/Gitea workflows locally: ```bash # Install act curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash # Test PR workflow act pull_request -s CONTAINER_REGISTRY_USERNAME=test -s CONTAINER_REGISTRY_PASSWORD=test # Test release workflow act push -e tests/fixtures/release-event.json ``` ## Troubleshooting ### Build Issues - Ensure all vendor assets are committed - Check Docker daemon is running - Verify buildx is properly configured ### Registry Issues - Check .env file configuration - Verify registry credentials - Test registry connectivity ### Performance Issues - Use build cache: `--cache-from type=gha` - Optimize Docker layers - Use multi-stage builds ```