Files
unitforge/docs/ci-cd/local-testing.md
William Valentin 03fa856199 feat: Add CI/CD secrets configuration and documentation
- Add comprehensive CI/CD secrets section to .env.example
- Create detailed CI-CD-SECRETS.md guide with:
  - Step-by-step secret setup instructions
  - Container registry authentication examples
  - PyPI token configuration
  - GitHub integration setup
  - Security best practices
  - Troubleshooting guide
  - Workflow-specific requirements

Includes support for:
- Docker Hub, GitLab, GitHub container registries
- Automated PyPI publishing
- Slack/Discord notifications
- Kubernetes deployment secrets
- Security scanning integration

Updated .env template with placeholder values and detailed comments.
2025-09-15 02:26:02 -07:00

1.1 KiB

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

# 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:

# 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