Skip to content

ci: add Cloudflare CI pipeline - #212

Draft
fengmk2 wants to merge 5 commits into
mainfrom
ci/cloudflare-ci-pipeline
Draft

fengmk2 wants to merge 5 commits into
mainfrom
ci/cloudflare-ci-pipeline

Conversation

@fengmk2

@fengmk2 fengmk2 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Add a Cloudflare CI pipeline in .cloudflare/ci/. It runs two jobs from test.yml in Cloudflare runners and reports them as GitHub checks. Cloudflare CI is in preview, so this PR is a draft.

Check Commands Same as
cloudflare-ci/build typecheck, check, build, and a compare of dist/ build
cloudflare-ci/unit-tests build, test Unit tests (ubuntu-latest)

The other jobs in test.yml run the action through uses: ./, so they stay on GitHub Actions. This PR does not change any GitHub Actions workflow.

Behavior

  • Runs start manually with Wrangler, because Cloudflare CI has no GitHub push or PR triggers yet. A run on a PR posts both checks, and posts a PR comment only when a check fails. A run on a commit SHA updates the checks and posts no comment.
  • Each check name in the comment links to its check page, and each check's summary shows the runner log, up to its last 16 KiB. The Details link opens the run in the Cloudflare dashboard.
  • The checks are not required checks.
  • The pipeline runs as the setup-vp-ci Worker and Workflow in the VoidZero-docs Cloudflare account. The deployed version runs for every branch. A change under .cloudflare/ci/ takes effect only after a deploy from main.

Run steps

Step What it does First run Run with cached install
checkout git fetch --depth 1 of the commit from GitHub 8 s 7 s
install pnpm install from package.json, pnpm-lock.yaml, and pnpm-workspace.yaml, with the runner cache 22 s 0 s (cached)
build typecheck, check, build, git diff --exit-code dist/ 13 s 12 s
unit-tests build, test 27 s 24 s
Total run 67 s 39 s

build and unit-tests run in parallel, and both restore the checkout and node_modules from the earlier steps. The install comes from the cache while the three manifest files do not change, for up to 7 days.

Runner environment

  • Every runner uses the managed workflows/node image, which has Node.js 24, Corepack, git, and jq. GitHub CI uses lts/* from .node-version.
  • The repository is public, so the checkout needs no token, also for the head of a fork PR.
  • The install uses pnpm install --ignore-scripts, because the root prepare script only sets up Git hooks. The repository allows no dependency build scripts, so the flag skips nothing else.
  • If the checkout or the install fails, both checks fail with the error. These steps retry 2 times. Each job runs in timeout 14m, so a hung job keeps its log.

Repository changes

  • .cloudflare/ci/tsconfig.json and the @cloudflare/workers-types devDependency let vp check type-check the pipeline. The root tsconfig.json still includes only src/**/*, so the action bundles do not change.
  • .cloudflare/ci/src/runner.d.ts declares step.runner(), which @cloudflare/workers-types does not include. It uses the result shape that the runtime returns, logs: { data, truncated }. The Cloudflare CI docs show logs.stdout and logs.stderr.
  • .fallowrc.json adds the pipeline as an entry point and includes the hidden .cloudflare/ directory, which Fallow skips by default.
  • CONTRIBUTING.md has a new Cloudflare CI section for runs, deploys, and the runner environment. AGENTS.md has a navigation line for the pipeline.

🤖 Generated with Claude Code

@socket-security

socket-security Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​cloudflare/​workers-types@​5.20261116.11001009699100

View full report

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Cloudflare CI on cc68d28:

  • ✅ cloudflare-ci/build
  • ✅ cloudflare-ci/unit-tests

Add a Cloudflare CI pipeline in .cloudflare/ci/. It runs the build job
and the Linux unit tests from test.yml in Cloudflare runners, and
reports them as the cloudflare-ci/build and cloudflare-ci/unit-tests
GitHub checks. Runs start manually with Wrangler, because Cloudflare CI
has no GitHub triggers yet.

- Type-check the pipeline in vp check through .cloudflare/ci/tsconfig.json
  and @cloudflare/workers-types. runner.d.ts adds step.runner(), which
  the published types do not include.
- Include .cloudflare/ in the Fallow audit, with the pipeline as an
  entry point.
- Document runs, deploys, and the runner environment in CONTRIBUTING.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fengmk2
fengmk2 force-pushed the ci/cloudflare-ci-pipeline branch from c68c6b5 to ef17292 Compare November 17, 2026 06:46
Each check links to its run in the Cloudflare dashboard and shows the runner log, up to the last 16 KiB, in its summary. Jobs run in timeout 14m, so a hung job keeps its log, and NO_COLOR removes ANSI codes from the log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Cloudflare CI on f6fcb67:

  • ✅ cloudflare-ci/build
  • ✅ cloudflare-ci/unit-tests

View the run in the Cloudflare dashboard

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Cloudflare CI on a5d2b44:

  • ✅ cloudflare-ci/build
  • ❌ cloudflare-ci/unit-tests (exit 1)

View the run in the Cloudflare dashboard

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Cloudflare CI on 18b879f:

View the run in the Cloudflare dashboard

fengmk2 and others added 2 commits November 20, 2026 11:55
The check page on the PR shows the runner log. The dashboard link stays at the end of the comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the managed workflows/node image, which has git and jq. A checkout
step fetches the commit from GitHub, because the repository is public,
and the build job compares dist/ with git diff, the same as test.yml.
This removes the source server, its signed URLs, SOURCE_SECRET, and the
workers.dev URL.

An install step gets only package.json, pnpm-lock.yaml, and
pnpm-workspace.yaml, and uses the runner cache. The jobs restore the
checkout and node_modules from it, so a run skips the install while
those files do not change.

A pull request comment is now posted only when a check fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fengmk2
fengmk2 force-pushed the ci/cloudflare-ci-pipeline branch from 18b879f to 4abd4a1 Compare November 20, 2026 03:58
Do not merge. Remove this commit before the PR leaves draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Cloudflare CI on aeb3f0b:

View the run in the Cloudflare dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant