Skip to content

ci: run build, type check and tests on pull requests - #48

Closed
Tadzik-2 wants to merge 1 commit into
mainfrom
ci/pull-request-checks
Closed

Tadzik-2 wants to merge 1 commit into
mainfrom
ci/pull-request-checks

Conversation

@Tadzik-2

@Tadzik-2 Tadzik-2 commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The only workflow is .github/workflows/publish.yml, which runs on v* tags. Nothing runs on pull requests or on pushes to main: tests only run at release time, bun run typecheck never runs in CI, and contributors' PRs are merged without automated checks.

Fix

Add .github/workflows/ci.yml, triggered on pull_request and on push to main:

  • permissions: contents: read; a concurrency group per workflow and ref that cancels superseded runs on pull requests (pushes to main are not cancelled).
  • One ubuntu-latest job (15 minute timeout) using the same toolchain as publish.yml: actions/checkout@v4, oven-sh/setup-bun@v2 pinned to bun 1.4.3 (the version the lockfile was produced with) instead of latest, and actions/setup-node@v4 with Node 22.
  • Steps: bun install --frozen-lockfile, bun run build, bun run typecheck, bun test, bun run test:ui:published.
  • The build runs before the type check because tsc resolves several @data-slot/* packages through their built dist/*.d.ts (the root tsconfig.json paths does not map them). A comment in the workflow says so.

Left out deliberately: the website/Astro steps from publish.yml (npm ci --prefix website and the Astro tree-shaking check). They are slow and belong to the release path.

No changes to publish.yml, package manifests, tsconfig, or source code.

Checks

Run locally from a fresh bun install --frozen-lockfile in a clean checkout of this branch (bun 1.4.3):

  • bun install --frozen-lockfile: passes, lockfile unchanged
  • bun run build: passes, UI build verified exports for 22 components
  • bun run typecheck: passes
  • bun test: 1828 pass, 0 fail across 52 files
  • bun run test:ui:published: verified ESM, CommonJS, and declarations for 22 UI components

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
data-slot ba11b0b Commit Preview URL

Branch Preview URL
Nov 10 2026, 10:09 AM

@Tadzik-2 Tadzik-2 closed this Nov 10, 2026
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