GibilGibil

Run CI Tests

Run your test suite on a clean machine without CI configuration

No YAML pipelines. No build minutes. No shared runners. Forge a clean server, run your tests, check the exit code.

Basic test run

# Forge a server with your repo
gibil create --name test-run \
  --repo https://github.com/you/project \
  --ttl 15

# Wait for cloud-init to finish installing deps
gibil run test-run "test -f /root/.gibil-tasks-done && echo READY"

# Run the test suite
gibil run test-run "cd /root/project && pnpm test"

# Clean up
gibil destroy test-run

With services (Postgres, Redis)

Add a .gibil.yml to your repo:

image: node:20

services:
  - name: db
    image: postgres:16
    port: 5432
    env:
      POSTGRES_PASSWORD: testpass
      POSTGRES_DB: testdb
  - name: cache
    image: redis:7
    port: 6379

tasks:
  - name: install
    command: pnpm install
  - name: test
    command: pnpm test

env:
  DATABASE_URL: postgres://postgres:testpass@localhost:5432/testdb
  REDIS_URL: redis://localhost:6379

Now gibil create --repo ... automatically starts Postgres and Redis before running tests.

Scripted CI (machine-readable)

#!/bin/bash
set -e

RESULT=$(gibil create --name ci-$GITHUB_SHA \
  --repo https://github.com/you/project \
  --ttl 15 --json)

NAME=$(echo "$RESULT" | jq -r .name)

# Wait for ready
while ! gibil run "$NAME" "test -f /root/.gibil-tasks-done" --json 2>/dev/null | jq -e '.exit_code == 0' > /dev/null; do
  sleep 5
done

# Run tests
TEST_RESULT=$(gibil run "$NAME" "cd /root/project && pnpm test" --json)
EXIT_CODE=$(echo "$TEST_RESULT" | jq .exit_code)

# Clean up (always, even on failure)
gibil destroy "$NAME" --json

exit $EXIT_CODE

Parallel test matrix

Split your test suite across multiple VMs:

gibil create --name test-unit --repo https://github.com/you/project --ttl 15 --json &
gibil create --name test-e2e --repo https://github.com/you/project --ttl 15 --json &
gibil create --name test-lint --repo https://github.com/you/project --ttl 15 --json &
wait

gibil run test-unit "cd /root/project && pnpm test:unit" --json &
gibil run test-e2e "cd /root/project && pnpm test:e2e" --json &
gibil run test-lint "cd /root/project && pnpm lint" --json &
wait

gibil destroy --all --json

Each VM is a fresh machine with its own Docker, its own Postgres, its own filesystem. No shared state, no flaky tests from leftover data.

Cost

A 15-minute test run on the default cpx11 costs ~€0.002 (~$0.002). A parallel matrix of 5 VMs for 15 minutes costs ~€0.01.

Next steps

On this page