CI/CD pipelines

Pipelines that never depend on live APIs

Flaky CI caused by third-party API downtime is a solved problem. Mockra gives your pipeline an ephemeral mock namespace per PR — spun up on open, torn down on merge, no infrastructure to manage.

Start for freeSee Pro plan
The problem
  • ✕CI tests fail because a third-party API is down or rate-limiting
  • ✕Integration tests hit real APIs and cost money on every pipeline run
  • ✕Shared staging environments cause test interference between PRs
  • ✕Tearing down test environments is manual and often skipped
  • ✕No isolation between branches — one PR's tests pollute another's
With Mockra
  • ✓Mock endpoints are always available — zero flakiness from upstream APIs
  • ✓Flat request cost regardless of how many pipeline runs you trigger
  • ✓Ephemeral namespace per PR — complete isolation between branches
  • ✓Namespace destroyed automatically on merge, no cleanup scripts needed
  • ✓API key auth for pipelines — no hardcoded credentials in CI config

Ephemeral mocks in your pipeline

.github/workflows/test.yml
name: Integration tests

on: [pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Create ephemeral mock namespace
        id: mock
        run: |
          RESPONSE=$(curl -sX POST https://api.mockra.io/namespaces \
            -H "Authorization: Bearer ${{ secrets.MOCKRA_API_KEY }}" \
            -H "Content-Type: application/json")
          echo "namespace=$(echo $RESPONSE | jq -r '.slug')" >> $GITHUB_OUTPUT
          echo "mock_url=$(echo $RESPONSE | jq -r '.mock_url_base')" >> $GITHUB_OUTPUT

      - name: Run integration tests
        env:
          API_BASE_URL: ${{ steps.mock.outputs.mock_url }}
        run: pnpm test:integration

      - name: Destroy mock namespace
        if: always()
        run: |
          curl -sX DELETE \
            https://api.mockra.io/namespaces/${{ steps.mock.outputs.namespace }} \
            -H "Authorization: Bearer ${{ secrets.MOCKRA_API_KEY }}"

Each PR gets its own isolated namespace. Cleanup is automatic even if the job fails.

Works with any CI platform
GitHub ActionsGitLab CICircleCIJenkinsBuildkiteDrone CITravis CIBitbucket Pipelines

Ephemeral namespaces and API key auth are available on the Pro plan.

Make flaky CI a thing of the past

Isolated mock environments per PR. No shared state, no external dependencies.

Get started for free