Custom CI/CD
GitHub Actions: Local testing in CI
- Applies to
- Gatewayruntime for API, AI, and MCP gateways
- Hosting
- Managed EdgeManaged DedicatedSelf-HostedDiffers
1 difference by hosting option
Self-Hosted
Add --self-hosted-endpoint with your management API hostname to each zuplo deploy command so it targets your cluster. See zuplo deploy.
Run tests against a local Zuplo development server before deploying anywhere. Catch issues earlier and avoid deploying broken changes.
.github/workflows/local-test-then-deploy.yaml
This workflow:
- Starts a local Zuplo server in the CI environment.
- Polls it until it answers, with a bounded deadline.
- Runs your test suite against localhost.
- Proceeds to deployment only if local tests pass.
- Deploys to Zuplo (only on pushes to main).
The poll replaces a fixed sleep. A sleep is a guess about startup time that is
wrong in both directions, and it is the most common reason a gateway test suite
"needs" a retry. The example polls /health — add an unauthenticated health
route if your gateway does not have one. See
health checks.
Why test locally first
- Faster feedback — local tests run without waiting for deployment.
- Catch syntax errors — the local server validates your configuration.
- Test policies — verify authentication, rate limiting, and other policies work correctly.
- No wasted deployments — don't deploy changes that fail tests.
Combine with remote tests
For maximum confidence, test both locally and against the deployed environment:
Code
Next steps
- Add PR preview environments for review
- Set up multi-stage deployment with staging
Last modified on