ci: add SDK freshness check and test runner jobs#26
Draft
Conversation
Adds two new CI jobs to the existing workflow: 1. SDK Freshness Check: Regenerates the CLI SDK from openapi.json and fails if the committed generated files differ. Ensures the SDK is always in sync with the spec. 2. Test: Runs vitest tests in packages/cli with TZ=UTC. Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
The CI test job requires vitest and test scripts in packages/cli. Adds vitest as devDependency and test/test:update scripts. Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com>
4 tasks
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.
ci: add SDK freshness check and test runner jobs
Summary
Adds two new CI jobs to the existing workflow in
.github/workflows/ci.yml:SDK Freshness Check — Runs
bun run generateinpackages/cliand thengit diff --exit-code packages/cli/src/generated/to verify the committed generated SDK matches whatopenapi.jsonwould produce. Fails with an actionable error message if they're out of sync.Test — Runs
bun run testinpackages/cliwithTZ=UTC. This will execute vitest tests (currently the snapshot tests from PR feat: add endpoint parameter contract snapshot tests for openapi.json #25, and any future tests added to the CLI package).Both jobs follow the same runner/bun/cache pattern as existing jobs (blacksmith-2vcpu, bun 1.3.0, frozen lockfile).
Also adds
vitestas a devDependency andtest/test:updatescripts topackages/cli/package.json, which the Test CI job requires.Review & Testing Checklist for Human
bun run typecheck.bun run generateis deterministic in CI. If the code generation tool produces non-deterministic output (e.g., different property ordering across runs), the freshness check will be flaky. Worth running it twice in CI to confirm identical output.packages/clitests. If other packages add tests later, consider renaming to "CLI Tests" or restructuring to run tests across packages.passWithNoTests: truein vitest config, this job will pass silently until then — confirm this is acceptable.vitest+ test scripts topackages/cli/package.json. Whichever merges second/third will havepackage.jsonandbun.lockconflicts that need resolving.Suggested test plan
packages/cli/src/generated/, push, and confirm theSDK Freshness Checkjob fails with the expected error messageTestjob failsNotes