Skip to content

feat: add example validation CI script (Closes #94) - #180

Open
panditdhamdhere wants to merge 5 commits into
Axionvera:mainfrom
panditdhamdhere:feat/example-validation-ci
Open

feat: add example validation CI script (Closes #94)#180
panditdhamdhere wants to merge 5 commits into
Axionvera:mainfrom
panditdhamdhere:feat/example-validation-ci

Conversation

@panditdhamdhere

Copy link
Copy Markdown
Contributor

Summary

  • Harden scripts/check-examples.mts with clear Zod path/message error output (--verbose)
  • Add pnpm test:examples covering valid and invalid example fixtures
  • Add CI workflow .github/workflows/check-examples.yml
  • Document when to run validation in docs/examples.md and link from README

Closes #94

Issue scope

  • Example validation script is added
  • Examples are validated against shared schemas where applicable
  • Invalid examples produce clear error output
  • Tests cover valid and invalid example files
  • Package scripts include the validation command
  • Documentation explains when to run validation

Affected packages / apps

  • apps/web
  • packages/types
  • packages/config
  • packages/fixtures
  • packages/validators
  • packages/stellar-kit
  • packages/anchor-utils
  • contracts/treasury-escrow
  • docs/
  • Other: scripts/check-examples.mts, scripts/check-examples.test.ts, .github/workflows/check-examples.yml, package.json, examples/, README.md, apps/web/app/docs/page.tsx

Testing performed

  • pnpm check:examples -- --verbose
  • pnpm test:examples

Screenshots / recordings

N/A

Security impact

  • This PR touches secret handling, callback URLs, network selection, or contract admin/authorization logic
  • No security-relevant surface touched

Documentation impact

  • Docs under /docs updated for this change
  • README updated (new package, script, or workflow)
  • No user-facing behaviour changed — no docs update needed

…oses Axionvera#94)

Hardens pnpm check:examples with clear Zod error output, adds script unit tests, wires a GitHub Actions workflow, and documents when contributors should run validation.
@El-swaggerito

Copy link
Copy Markdown
Contributor
\nGitHub has not finished calculating whether this PR can be merged cleanly.\n\nThe auto-merge automation will skip this PR for now. Re-run the automation later.

@El-swaggerito

Copy link
Copy Markdown
Contributor
\nThis PR is currently blocked by merge conflicts.\n\nPlease update the branch with the latest main branch and resolve the conflicts before it can be merged.

@panditdhamdhere

Copy link
Copy Markdown
Contributor Author

kindly check now.

The workflow pinned pnpm 9 while package.json declares pnpm@9.0.0, which
made pnpm/action-setup fail with ERR_PNPM_BAD_PM_VERSION before install.
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.

Add AnchorKit example validation CI script

2 participants