Skip to content

ci: run installed-package consumer checks before publish - #794

Open
cindybby18 wants to merge 1 commit into
Anchor-kit:mainfrom
cindybby18:fix/issue-694-run-installed-package-consumer-checks-in-r2
Open

cindybby18 wants to merge 1 commit into
Anchor-kit:mainfrom
cindybby18:fix/issue-694-run-installed-package-consumer-checks-in-r2

Conversation

@cindybby18

Copy link
Copy Markdown

Overview

This PR runs the Bun and Node consumer fixtures against the packed artifact in CI and before publication, so a broken runtime import or declaration fails the consumer job instead of reaching npm.

Related Issue

Closes #AK-006

Changes

  • [MODIFY] .github/workflows/ci.yml
    • Adds a consumer job that packs the SDK and runs the Bun and Node consumer fixtures against the tarball.
  • [MODIFY] .github/workflows/publish.yml
    • Runs the same consumer checks after packing and before the publish step, gating publication on their success.
  • [ADD] scripts/check-package-consumer.mjs
    • Installs the packed tarball into a clean fixture directory and executes the consumer checks.
  • [ADD] fixtures/consumer/package.json
    • Minimal consumer manifest used to install the packed artifact.
  • [ADD] fixtures/consumer/verify.mjs
    • Imports the installed package entry points and asserts that runtime exports and declarations resolve.

Verification Results

node scripts/check-package-consumer.mjs

Expected result: the script packs the SDK, installs the tarball into fixtures/consumer, runs verify.mjs under both Bun and Node, and exits 0. Introducing a broken runtime import or a missing declaration causes the script to exit non-zero, which fails the consumer job before publication.

Acceptance Criteria Status
A broken runtime import or declaration causes the consumer job to fail before publication ✅ Consumer job runs before the publish step and exits non-zero on failure
The pull request includes a reproducible focused check, with its command and expected result documented ✅ node scripts/check-package-consumer.mjs with expected result above

Closes #694

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.

Run installed-package consumer checks in release CI

1 participant