ci: add CI workflow, release automation, and PR template - #2
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 tomainwith 4 parallel jobs:vp checkvp check --type-onlyvp run --filter bones buildvp run --filter bones test -- --runRelease workflow (
.github/workflows/release.yml) — changesets-based automated npm publishing and GitHub releases on merge tomain.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 checkpasses locallyvp run --filter bones buildsucceedsvp run --filter bones test -- --run— 31/31 tests pass