patternfly / patternfly/patternfly-component-schemas

Add CI pipeline to validate generated schemas

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Add a GH Actions workflow to validate that generated schemas are in sync with generator scripts. This will catch broken Zod schemas before publish, validate that schemas are regenerated when generator logic changes, and prevents stale/mismatched schemas.

Acceptance Criteria:
  1. TypeScript compilation - Zod schemas should compile without errors
  2. Schema consistency - Committed should schemas match generator output (dev MUST run npm run build after updating generators, otherwise will fail)
Workflow:
on: [pull_request, push]
steps:
  - npm ci
  - npm run build
  - git diff --exit-code  # Fail if schemas don't match
  - npx tsc --noEmit zod/index.ts  # Fail if TS errors

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running npm ci and npm run build, then inspect the generated schemas and zod/index.ts. Add the GitHub Actions workflow described in the issue and verify that git diff --exit-code detects stale generated files and npx tsc --noEmit zod/index.ts reports compilation errors; done means both checks pass on pushes and pull requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
build-system, ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.