> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anonalabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test every push in a sandbox

> A scoped, expiring key and a sandbox per job.

**You want** CI jobs that run tests in a clean machine and leave nothing behind.

**1. Make a key for CI**

In the [dashboard](https://app.compute.anonalabs.com), create a key with the **Create and use** preset and a 30 or 90 day expiry. It can create, use and delete sandboxes, and nothing else. See [CI and API keys](https://docs.anonalabs.com/compute/guides/ci.md).

**2. Store it as a secret**

Expose it as `E2B_API_KEY` with `E2B_DOMAIN=compute.anonalabs.com`. The stock `e2b` SDK works as is.

**3. Create, run, delete**

Create a sandbox per job, copy the repository in, run the tests, and delete the sandbox in a step that always runs. The CLI's `exec` and `run` exit with the remote command's exit code, so a failing test fails the job.

**Next:** [CI and API keys](https://docs.anonalabs.com/compute/guides/ci.md) has a complete GitHub Actions workflow.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.