-
Notifications
You must be signed in to change notification settings - Fork 0
144 lines (134 loc) · 4.62 KB
/
Copy pathe2e.yml
File metadata and controls
144 lines (134 loc) · 4.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: e2e (real deploy)
# On-demand only. Each matrix job builds with flue + deploys a real Worker
# via wrangler, runs the snippet's harness, then wrangler deletes it.
#
# Two tiers in the matrix:
# - examples/<product>/ , hello-world per CF product (simplest agent)
# - recipes/<name>/ , composition snippets (multiple primitives)
# - templates/<name>/ , forkable starters (production-shape)
#
# Cost per snippet per run ≈ $0.0001 (Workers AI llama scout).
on:
workflow_dispatch:
inputs:
target:
description: 'Target to run (default: all)'
required: false
default: 'all'
type: choice
options:
- all
- examples
- recipes
- templates
# examples
- examples/workers-ai
- examples/kv
- examples/r2
- examples/d1
- examples/durable-objects
- examples/ai-gateway
- examples/queues
- examples/vectorize
- examples/browser-rendering
- examples/worker-loader
- examples/hyperdrive
- examples/email-workers
- examples/effect-hello
# recipes
- recipes/lab-receipt
- recipes/do-session
- recipes/do-governor
- recipes/lab-checkpoint
- recipes/ai-gateway
- recipes/gateway-lab
- recipes/github-triage
- recipes/chat-thinking
- recipes/virtual-sandbox
- recipes/mcp-client
- recipes/dynamic-workflow
- recipes/event-trigger
- recipes/braintrust-ai-gateway
- recipes/braintrust-eval
- recipes/braintrust-otel
- recipes/braintrust-trace
- recipes/computer-workspace
# templates
- templates/github-app
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.
max-parallel: 1
matrix:
target:
# examples/
- examples/workers-ai
- examples/kv
- examples/r2
- examples/d1
- examples/durable-objects
- examples/ai-gateway
- examples/queues
- examples/vectorize
- examples/browser-rendering
- examples/worker-loader
- examples/hyperdrive
- examples/email-workers
- examples/effect-hello
# recipes/
- recipes/lab-receipt
- recipes/do-session
- recipes/do-governor
- recipes/lab-checkpoint
- recipes/ai-gateway
- recipes/gateway-lab
- recipes/github-triage
- recipes/chat-thinking
- recipes/virtual-sandbox
- recipes/mcp-client
- recipes/dynamic-workflow
- recipes/event-trigger
- recipes/braintrust-ai-gateway
- recipes/braintrust-eval
- recipes/braintrust-otel
- recipes/braintrust-trace
- recipes/computer-workspace
# templates/
- templates/github-app
name: ${{ matrix.target }}
steps:
- name: Skip if not selected
if: >-
${{
github.event.inputs.target != 'all'
&& github.event.inputs.target != matrix.target
&& !(github.event.inputs.target == 'examples' && startsWith(matrix.target, 'examples/'))
&& !(github.event.inputs.target == 'recipes' && startsWith(matrix.target, 'recipes/'))
&& !(github.event.inputs.target == 'templates' && startsWith(matrix.target, 'templates/'))
}}
run: echo "skipped, input asked for ${{ github.event.inputs.target }}" && exit 0
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install (per-snippet, self-contained Flue 2 deps)
working-directory: ${{ matrix.target }}
run: bun install
- name: Run E2E (vite build + wrangler deploy + assert + delete)
working-directory: ${{ matrix.target }}
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 }}
# examples/email-workers, real Email Service send. If these
# secrets aren't set, the agent still deploys and the assert
# passes via the "structured error" branch.
EMAIL_FROM: ${{ secrets.EMAIL_FROM }}
EMAIL_TO: ${{ secrets.EMAIL_TO }}
run: bash run-e2e.sh