Commit ddc50a6
Add upstream e2e test script for running vercel/workflow e2e tests locally (#27)
* Add upstream e2e test script for running vercel/workflow e2e tests locally
Clones vercel/workflow, builds it, installs local world packages via tarball,
starts a Next.js dev server, and runs the e2e test suite against the specified
world. Includes workarounds for restricted network environments (corepack,
SWC WASM pre-fetch, docs build exclusion).
Usage: pnpm e2e:starter, pnpm e2e:turso, pnpm e2e:mongodb, pnpm e2e:redis
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Add WORKFLOW_PUBLIC_MANIFEST and WORKFLOW_SERVICE_URL env vars
The manifest endpoint was returning 404 because WORKFLOW_PUBLIC_MANIFEST
wasn't set. Also adds WORKFLOW_SERVICE_URL for queue callback routing.
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Fix runId validation in turso/redis facade to allow client-provided runId
The upstream @workflow/core now generates runId client-side and passes it
to createEvent() for run_created events. PR #24 fixed the inner storage
layer but missed the facade in index.ts which still rejected non-null
runId for run_created events. Also fix turso DB path to use absolute path
so both the dev server and test process access the same database.
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Add GitHub Actions workflow for upstream e2e tests
Runs the vercel/workflow e2e test suite against local builds of our
world packages (turso, mongodb, redis). Checks out the upstream repo,
uses its own setup-workflow-dev action, then installs our local tarball
and runs the full e2e suite.
Triggers on push to main, PRs, and manual dispatch with world selection
and upstream ref override.
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Revamp e2e workflow: shared upstream build via cache, fix artifact path
- Build upstream once in the build job and share via actions/cache
keyed by upstream commit SHA (persists across workflow runs)
- E2E jobs restore from cache instead of independently rebuilding
- Fix artifact upload: use directory path instead of glob pattern
- E2E jobs run in .upstream/ subdirectory with working-directory
- Dynamically detect upstream pnpm version for the build step
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Replace artifact upload/download with actions/cache for tarballs
The download-artifact step was failing with "Artifact not found" in the
e2e jobs, likely due to cross-job context issues when no checkout is
present. Switch to actions/cache (keyed by github.sha) for sharing
tarballs between jobs, matching the pattern already used for the
upstream build cache.
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Fix tarball path: use absolute path for pnpm --filter add
pnpm resolves paths relative to the filtered package directory, not cwd.
Use readlink -f to get the absolute path of the tarball.
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Add e2e summary job with PR comment and step summary
- New aggregation script at scripts/aggregate-e2e-results.js that parses
vitest JSON output and renders a markdown summary table per world
- Summary job downloads result artifacts, generates markdown, writes to
GITHUB_STEP_SUMMARY and posts a sticky PR comment via marocchino action
- Shows per-world pass/fail/skip counts with failed test details in
collapsible sections
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Fix summary job: handle missing results, add fallback PR message
- continue-on-error on artifact download (no artifacts when e2e jobs fail early)
- mkdir -p e2e-results so aggregation script always has a directory
- Add fallback message to sticky comment when summary file doesn't exist
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Fix cache timeout: strip node_modules from upstream cache
The upstream cache was ~1.5GB with node_modules included, causing
restore timeouts in e2e jobs. Now we strip all node_modules from
the cache (~200MB) and each e2e job runs pnpm install with pnpm
store caching via setup-node.
Also dynamically reads upstream's pnpm version from package.json
instead of hardcoding 10.14.0.
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Add dev server log capture for debugging webhook test failures
The webhookWorkflow e2e test (new in upstream) fails with 404 for
Redis/Turso but passes for MongoDB. Capture dev server stdout/stderr
to a log file and upload as artifact. Show last 200 lines on failure.
This will help diagnose whether the error is "hook not found",
"serialization failed", or "response not sent".
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Fix e2e summary: rename to .cjs and ensure fallback file exists
- Rename aggregate-e2e-results.js → .cjs to fix "require is not
defined in ES module scope" (package.json has "type": "module")
- Always create e2e-summary.md fallback file if script fails, so
sticky-pull-request-comment never hits "Either message or path
input is required"
- Remove unused message param from sticky comment (path always exists)
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Add pull-requests: write permission for PR comment
The sticky-pull-request-comment action needs write access to post
comments. Without it: "Resource not accessible by integration".
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Revert runId facade changes (moved to separate PR)
The turso/redis index.ts runId validation fix has been moved to its
own PR (claude/fix-runid-facade-SFNpV) to keep this PR focused on
the e2e testing setup.
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Add contents: read permission to fix e2e jobs
Setting explicit permissions drops all defaults to none. Without
contents: read, jobs can't checkout code or restore caches.
Matches the pattern used in benchmarks.yml.
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
* Fix workflow_dispatch nested under permissions instead of on
The workflow_dispatch trigger was indented under permissions block
instead of the on block, so it was parsed as a permission key (and
ignored). Move it back under on, and place permissions after all
triggers.
https://claude.ai/code/session_016KjC15tQfm7ccAuTBNVyWD
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 87885b8 commit ddc50a6
5 files changed
Lines changed: 1207 additions & 0 deletions
File tree
- .github/workflows
- scripts
0 commit comments