Skip to content

ci: smoke-test that npm run openapi-ts still works on dependency bumps - #1368

Merged
gabrielseco merged 2 commits into
mainfrom
ci/openapi-codegen-smoke-test
Sep 24, 2026
Merged

gabrielseco merged 2 commits into
mainfrom
ci/openapi-codegen-smoke-test

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a CI job that runs npm run openapi-ts against the production gateway whenever a PR touches package.json/package-lock.json, so a dependency bump that breaks the codegen path fails CI instead of silently landing.

Why

Nothing in CI today actually exercises npm run openapi-ts. #1325 (the TypeScript 6 → 7 / tsdown migration) silently broke it — @hey-api/openapi-ts peer-depends on TypeScript 6.x, so the pin to 7.0.2 made codegen crash for anyone who ran it locally, and nobody noticed until #1367 tried to regenerate the client for an unrelated dependency bump. Gating this on @hey-api/openapi-ts's own version line wouldn't have caught it, since the breaking change came from an unrelated dependency (typescript) — so this triggers on any package.json/package-lock.json change instead.

Deliberately not diffing the regenerated src/client output against what's committed: the production schema drifts independently of any given PR, so a diff by itself isn't a failure — it would just make unrelated dependency-bump PRs fail because the API happened to change upstream. Only a nonzero exit (the generator itself crashing) fails this job.

What changed

Toggle details

Sequencing note: until #1367 merges, any other PR that touches package.json/package-lock.json while main still has the broken @hey-api/openapi-ts pin will fail this new check too, even if unrelated to codegen. Worth merging #1367 first, or shortly after this one.

Screenshots

N/A

Related Resources

Testing

  • N/A — CI workflow only, no UI change
  • Feature flag: N/A

Note

Low Risk
Adds read-only CI coverage only; no runtime or application code changes.

Overview
Adds a path-filtered GitHub Actions workflow that runs on PRs touching package.json or package-lock.json.

The job checks out the repo, installs with npm ci, and runs npm run openapi-ts against the production gateway. Only a nonzero exit fails CI—it does not compare regenerated src/client output to what is committed, so upstream schema drift does not block unrelated dependency bumps.

This closes the gap where dependency changes (e.g. TypeScript 7 vs @hey-api/openapi-ts peer expectations) could break codegen without any CI signal.

Reviewed by Cursor Bugbot for commit 83a14f4. Bugbot is set up for automated code reviews on this repo. Configure here.

Nothing in CI actually exercises the openapi-ts codegen path today, so a
dependency bump that breaks it (e.g. the typescript 6->7 migration in
#1325, which broke @hey-api/openapi-ts's peer-dependency compatibility —
see #1367) only surfaces when someone manually regenerates the client.

Runs on any PR touching package.json/package-lock.json rather than just
@hey-api/openapi-ts's own line, since the actual trigger can be any
dependency in that graph. Only fails on a nonzero exit (the generator
crashing) — deliberately does not diff the regenerated output against
what's committed, since the production schema drifts independently of
any given PR and a diff there isn't itself a failure.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-c7qgnse0q-remotecom.vercel.app
Latest Commit:83a14f4

Deployed with vercel-action

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-g1fgecdc6-remotecom.vercel.app
Latest Commit:83a14f4

Deployed with vercel-action

@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚪ Coverage unchanged

Metric Current Previous Change Status
Lines 86.19% 86.19% 0% ⚪
Statements 85.77% 85.77% 0% ⚪
Functions 84.73% 84.73% 0% ⚪
Branches 77.66% 77.66% 0% ⚪

Detailed Breakdown

Lines Coverage
  • Covered: 4780 / 5546
  • Coverage: 86.19%
  • Change: 0% (0 lines)
Statements Coverage
  • Covered: 4864 / 5671
  • Coverage: 85.77%
  • Change: 0% (0 statements)
Functions Coverage
  • Covered: 1276 / 1506
  • Coverage: 84.73%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 2962 / 3814
  • Coverage: 77.66%
  • Change: 0% (0 branches)

✅ Coverage check passed

Rationale belongs in the PR description, not a multi-line comment block.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gabrielseco
gabrielseco merged commit 23282ce into main Sep 24, 2026
14 checks passed
@gabrielseco
gabrielseco deleted the ci/openapi-codegen-smoke-test branch September 24, 2026 08:53
@gabrielseco gabrielseco mentioned this pull request Sep 25, 2026
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.

2 participants