Guides
CI runners
Send each GitHub Actions job to a fresh Moil box by changing runs-on, or run a single command in a box from any CI system.
Preview. Runner labels, the GitHub App and the CLI shown here are placeholders and are not published yet.
runs-on: moil-* | CLI from any CI | |
|---|---|---|
| What runs in Moil | The whole job, in a box of its own | One command per step |
| Setup | Connect the GitHub App, change one line | An API key stored as a CI secret |
| Works with | GitHub Actions | Anything that can run Node |
1. Change runs-on
Connect GitHub from the dashboard, then swap your runner label. Each job boots a clean Ubuntu 24.04 box with common toolchains and is deleted when the job ends.
name: teston: [push, pull_request]jobs: test: runs-on: ubuntu-24.04 runs-on: moil-medium steps: - uses: actions/checkout@v4 - run: npm ci && npm test - lint moil-medium passed
- test (node 22) moil-medium passed
- e2e (chromium) moil-medium passed
Runner sizes
| Label | Box |
|---|---|
moil-small | 2 vCPU · 4 GiB |
moil-medium | 4 vCPU · 8 GiB |
moil-large | 8 vCPU · 16 GiB |
moil-xlarge | 16 vCPU · 32 GiB |
moil-2xlarge | 32 vCPU · 64 GiB |
Which sizes a workspace can use will depend on its plan. See the pricing preview.
2. The CLI from any CI
A step creates a box, uploads the checkout, runs one command and deletes the box. First store an API key as a secret:
moil keys create --name github-ci --expires-in 90d --json | jq -r .key | gh secret set MOIL_API_KEY jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
MOIL_API_KEY: ${{ secrets.MOIL_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Run the tests in a Moil box
run: npx moil@latest run --push . --timeout 10m -e CI=1 -- 'npm ci && npm test' - The step fails when the command fails, and the command has a time limit.
- Pass secrets explicitly with
-e NAME="$NAME". Pull requests from forks get no secrets, so the step can’t run there.
Questions
What will the GitHub App need?
The app isn’t published yet. We’ll list every permission it asks for here, and why, before it is.
Can I skip the GitHub App?
Yes — the CLI route needs nothing but an API key.
Something else?
Write to support@moil.dev.