Skip to content

ci: add CI workflow, release automation, and PR template - #2

Merged
hunterbecton merged 9 commits into
mainfrom
ci/guard-rails
Apr 30, 2026
Merged

hunterbecton merged 9 commits into
mainfrom
ci/guard-rails

Conversation

@hunterbecton

@hunterbecton hunterbecton commented Apr 30, 2026 •

Copy link
Copy Markdown
Member

What/Why?

Set up GitHub Actions guard rails for the bones repo, modeled after Storefront Kit but adapted for the Vite+ toolchain.

CI workflow (.github/workflows/ci.yml) — runs on every PR and push to main with 4 parallel jobs:

  • Lint & Format — vp check
  • Type Check — vp check --type-only
  • Build — vp run --filter bones build
  • Test — vp run --filter bones test -- --run

Release workflow (.github/workflows/release.yml) — changesets-based automated npm publishing and GitHub releases on merge to main.

PR template — prompts for What/Why and Testing sections.

Changesets — version management so contributors describe changes upfront and the release workflow handles versioning and publishing.

Testing

  • vp check passes locally
  • vp run --filter bones build succeeds
  • vp run --filter bones test -- --run — 31/31 tests pass
  • YAML lint validates both workflow files

Set up GitHub Actions guard rails modeled after Storefront Kit:
- CI workflow with lint, typecheck, build, and test jobs using Vite+
- Release workflow with changesets for automated npm publishing
- PR template prompting for What/Why and Testing sections
Add separate check/build/test jobs for each workspace:
- Bones: lint, format, types, build, test
- Demo: typecheck, build, test
- Docs: build

All jobs run in parallel since Next.js apps transpile bones from source.
- Fix test mocks: add missing `data`, `lines`, and render callback to `repeat`
- Fix bones-devtool useRef() to pass initial arg (React 19 types)
- Fix evolution-chain-card test: trigger null → empty string
- Fix forced-skeletons-demo test: await async server component, mock fetcher
- Fix suspense-demo test: mock fetcher/delay, render without props
- Fix info-card test: add required `labels` prop
- Fix hero-section test: match updated heading and subtitle copy
- Fix base-stats-card test: use mapped label names, handle duplicate values
- Fix pokemon-detail-view test: adjust skeleton assertion for lines()
Add a `check` script (tsc --noEmit) to docs and a corresponding CI job
so type errors in the docs app are caught on PRs.
The bones package exports point to dist/, so the library must be built
before Next.js can resolve the module in downstream apps.
Vitest's import analysis also needs dist/ to resolve the bones module,
even when tests mock it. Add the build step to the demo-test job.
TypeScript also needs the .d.mts declarations from dist/ to resolve
the bones module. Add the build step to demo-check and docs-check.
fumadocs-mdx generates the .source/ directory (gitignored) that
lib/source.ts imports from. Run it before tsc so types resolve in CI.
Swap the old UserCard preview for a DemoPokemonCard component with a
loaded/skeleton blend slider. Remove unused preview-toggle and preview
components.
@hunterbecton
hunterbecton merged commit 4eb715f into main Apr 30, 2026
8 checks passed
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