Skip to content

e2e (real deploy)

e2e (real deploy) #14

Workflow file for this run

name: e2e (real deploy)
# On-demand only. Each matrix job deploys a real Worker via alchemy,
# runs gateproof against it, then `alchemy destroy`s it. The account
# stays clean because every CI run gets its own alchemy stage and the
# trap-cleanup in run-e2e.sh always destroys.
#
# Cost per snippet per run ≈ $0.0001 (Workers AI llama-scout).
on:
workflow_dispatch:
inputs:
snippet:
description: 'Snippet to run (default: all)'
required: false
default: 'all'
type: choice
options:
- all
- lab-receipt
- do-session
- do-governor
- lab-checkpoint
- ai-gateway
- gateway-lab
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
# Sequential. Workers AI on the personal CF account rate-limits
# heavily under parallel load — running all snippets simultaneously
# makes the do-governor 5-turn probe time out reliably. Going one
# at a time keeps end-to-end wall time around 12 minutes for all
# six jobs but every job is reliable.
max-parallel: 1
matrix:
snippet:
- lab-receipt
- do-session
- do-governor
- lab-checkpoint
- ai-gateway
- gateway-lab
name: ${{ matrix.snippet }}
steps:
- name: Skip if not selected
if: ${{ github.event.inputs.snippet != 'all' && github.event.inputs.snippet != matrix.snippet }}
run: echo "skipped — input asked for ${{ github.event.inputs.snippet }}" && exit 0
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install
run: bun install --frozen-lockfile
- name: Run E2E (alchemy deploy + gateproof + alchemy destroy)
working-directory: snippets/${{ matrix.snippet }}
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID_E2E }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN_E2E }}
LAB_URL: https://lab.coey.dev
GITHUB_SHA: ${{ github.sha }}
# Per-run unique alchemy stage so destroy always scopes to
# this run, even if a previous run leaked state.
STAGE: ci-${{ github.run_id }}
# Alchemy's local-fs state store is ephemeral on the runner.
# Each job does deploy → assert → destroy in one process, so
# persistent state would never be read again. Disable the
# CI guardrail.
ALCHEMY_CI_STATE_STORE_CHECK: 'false'
run: bash run-e2e.sh