ZuploZuplo
LoginSign Up
  • Documentation
  • API Reference
Introduction
Getting Started
    Develop using the Portal
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingMCP - Quick start
    Develop Locally
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth
Concepts
Development
Policies
Handlers
API Keys
MCP Server
MCP Gateway
AI Gateway
Developer Portal
Monetization
Deploying & Source Control
    Overview
    GitHub
      SetupTesting Deployments
      Custom CI/CD
        Basic DeploymentDeploy and TestPR Preview EnvironmentsLocal Testing in CITag-Based ReleasesMulti-Stage DeploymentAutomatic Cleanup
    GitLab
    Bitbucket
    Azure DevOps
    CircleCI
    Custom CI/CDMonorepo DeploymentRename/Move Project
Observability
Networking & Infrastructure
Account Management
Programming API
Build with AI
Zuplo CLI
Migration Guides
Platform LimitsSecuritySupportTrust & ComplianceChangelog
powered by Zudoku
Custom CI/CD

GitHub Actions: Local Testing in CI

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
name: Local Test Then Deploy on: push: branches: - main pull_request: jobs: local-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies run: npm install - name: Start local server and run tests run: | # Start the local dev server in the background npx zuplo dev & DEV_PID=$! # Wait for server to be ready echo "Waiting for local server to start..." sleep 10 # Run tests against local server npx zuplo test --endpoint http://localhost:9000 # Stop the dev server kill $DEV_PID deploy: needs: local-test runs-on: ubuntu-latest # Only deploy on push to main, not on PRs if: github.event_name == 'push' && github.ref == 'refs/heads/main' env: ZUPLO_API_KEY: ${{ secrets.ZUPLO_API_KEY }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies run: npm install - name: Deploy to Zuplo run: npx zuplo deploy --api-key "$ZUPLO_API_KEY"

This workflow:

  1. Starts a local Zuplo server in the CI environment
  2. Runs your test suite against localhost
  3. Only proceeds to deployment if local tests pass
  4. Deploys to Zuplo (only on pushes to main)

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 will fail tests

Combining with Remote Tests

For maximum confidence, test both locally and against the deployed environment:

Code
jobs: local-test: # ... local testing job ... deploy-and-test: needs: local-test # ... deploy and run tests against live environment ...

Next Steps

  • Add PR preview environments for review
  • Set up multi-stage deployment with staging
Edit this page
Last modified on December 3, 2025
PR Preview EnvironmentsTag-Based Releases
On this page
  • Why Test Locally First?
  • Combining with Remote Tests
  • Next Steps
YAML
YAML