Skip to content

Commit 016fba4

Browse files
ssilviusclaude
andcommitted
ci: smoke workflow runs post-deploy mvp suite on push to main (#126)
Was marked out-of-scope in the original #126 issue body, but it is the operational link that closes the deploy loop -- without it, operators have to remember to run pnpm test:e2e by hand after every deploy. .github/workflows/smoke.yml - Triggers: push to main, plus manual workflow_dispatch with an optional include_cost boolean for the @cost-tagged tests (Anthropic + Resend charges). - 5-minute timeout. Default run skips @cost via --grep-invert. - Uploads the playwright-report artifact on failure (7-day retention). - Uses INCLUDE_COST as an env var rather than ${{ inputs.* }} inline, per the workflow-injection guidance. Sequencing - This workflow runs against the deployed production URL (default https://rafters.studio per playwright.config.ts), so it fires AFTER wrangler deploy. Order on push to main: 1. CI workflow runs typecheck + unit tests 2. (Operator) wrangler deploy from local 3. Smoke workflow fires (also on push) and exercises the deployed worker - If a smoke run fires before the deploy lands, it will fail against the prior version. That is correct behavior -- a deploy hasn't happened, so the new code isn't live, so the smoke should report the gap. Out of scope - Auto-deploy from CI (operator-controlled) - Slack / PagerDuty notification on failure - Smoke against staging (single env for MVP) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ad87525 commit 016fba4

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/smoke.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Smoke
2+
3+
# Runs the post-deploy MVP smoke suite (#126) against production after every
4+
# push to main. Default run skips @cost-tagged tests (Anthropic + Resend
5+
# charges); operators run those manually with --grep @cost.
6+
7+
on:
8+
push:
9+
branches: [main]
10+
workflow_dispatch:
11+
inputs:
12+
include_cost:
13+
description: "Run @cost-tagged tests (real Anthropic + Resend charges)"
14+
type: boolean
15+
default: false
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
smoke:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 5
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: pnpm/action-setup@v4
28+
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: 22
32+
cache: pnpm
33+
34+
- run: |
35+
mkdir -p "$(pnpm bin)"
36+
printf '#!/bin/sh\nexit 0' > "$(pnpm bin)/lefthook"
37+
chmod +x "$(pnpm bin)/lefthook"
38+
pnpm install --frozen-lockfile
39+
40+
- run: pnpm exec playwright install --with-deps chromium
41+
42+
- name: Smoke
43+
env:
44+
INCLUDE_COST: ${{ inputs.include_cost }}
45+
run: |
46+
if [ "$INCLUDE_COST" = "true" ]; then
47+
pnpm test:e2e
48+
else
49+
pnpm test:e2e --grep-invert @cost
50+
fi
51+
52+
- if: failure()
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: playwright-report
56+
path: playwright-report/
57+
retention-days: 7

0 commit comments

Comments
 (0)