Skip to content

ci: build on Node 20 and publish releases from tags - #117

Closed
Pranav-Bobde wants to merge 1 commit into
keploy:mainfrom
Pranav-Bobde:ci/node20-release
Closed

Pranav-Bobde wants to merge 1 commit into
keploy:mainfrom
Pranav-Bobde:ci/node20-release

Conversation

@Pranav-Bobde

Copy link
Copy Markdown

Problem

  • @keploy/sdk on npm is 2.0.10 (published 2024-07-23 from a063214), but package.json on main still says 2.0.2, so the repo doesn't say which version is live.
  • PR CI runs on Node 14, which reached end of life in April 2023, with actions/checkout@v2 and setup-node@v2.
  • Releases are manual. ci: add a github actions for publishing to npm #114 adds a publish workflow, but as written it would fail: setup-node gets no registry-url, so it writes no npm auth config and NODE_AUTH_TOKEN is ignored at npm publish. It also publishes whatever version is in package.json, so a release tag and npm can drift again.

The package is still in use (about 4,300 downloads in the last 30 days) and the v4 Node quickstarts in keploy/docs install it.

Change

  • ci.yml: Node 20, actions/checkout@v4, actions/setup-node@v4 with npm cache, npm ci + npm run build on the existing lockfile (the repo has package-lock.json, not a yarn lock). Commitlint step unchanged.
  • release.yml (builds on ci: add a github actions for publishing to npm #114 by @Sarthak160): runs on a published GitHub release, sets registry-url so the token is used, sets the package version from the release tag (v2.0.11 -> 2.0.11), then npm ci, build, and npm publish --provenance --access public. Needs an NPM_TOKEN repo secret.
  • package.json / lockfile: version 2.0.2 -> 2.0.10, matching npm.

Verified locally

  • npm ci && npm run build on a clean checkout: passes.
  • Tag v2.0.11 -> npm version sets 2.0.11.
  • Both workflow files parse as valid YAML.

If this lands, #114 can be closed.

- CI: Node 14 (end of life since 2023) -> Node 20, actions v4, npm ci with the existing lockfile.
- Release: builds on keploy#114. Adds registry-url so setup-node writes the npm auth config
  (without it NODE_AUTH_TOKEN is ignored and publish fails), and takes the version from
  the release tag so npm always matches a tagged commit.
- package.json: 2.0.2 -> 2.0.10, the version already on npm (published from a063214).
slayerjain added a commit that referenced this pull request Oct 31, 2026
…mits and tag-only releases

given() posts to /agent/scope/given, which keploy/keploy#5016 adds and
no keploy release serves yet. On a keploy without it, the error said
"use a keploy and a @keploy/playwright of the same release", and no such
release exists. It now says what happened and what is needed:

  keploy: this keploy agent answered 404 to POST /agent/scope/given, so
  it cannot take the given value <name>: given needs a keploy that serves
  that route, which keploy/keploy#5016 adds

Claim, begin, settle and end work with released keploy, so the package
is usable without given.

README:
- Limits: given's route (with the error above), and the third limit the
  package has: the beforeAll and afterAll hooks of a group whose tests
  are all set aside still run, because each test is skipped at its own
  begin.
- Releasing: bump the version in a pull request, then push
  playwright-vX.Y.Z as a plain git tag on main. Never create a GitHub
  release for it: a published release starts every workflow of the
  repository that runs on releases, such as the root @keploy/sdk release
  workflow of #117, which would try to publish under the tag's name. The
  publish workflow's header says the same.
- Run the suite with --retries=0 as well as --workers=1, with the
  reason.

Signed-off-by: slayerjain <shubhamkjain@outlook.com>
@slayerjain

Copy link
Copy Markdown
Member

Closing this as covered by what is on main now:

  • ci.yml builds on Node 22 with actions/checkout@v4 and actions/setup-node@v4.
  • fix: ship @keploy/sdk without typescript, and check licenses on publish #123 added sdk-publish.yml. It publishes from an sdk-vX.Y.Z tag, refuses a tag that does not match package.json's version, and publishes with provenance. @keploy/sdk@2.0.11 went out through it, and package.json on main says 2.0.11, matching npm.

Thanks for the groundwork here: the registry-url and version-drift points carried over into that workflow.

@slayerjain slayerjain closed this Nov 4, 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