Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

Adds a comprehensive smoke test suite that validates the npm package can be installed and the server starts correctly.

What changed

  • Added scripts/smoke-test.sh: Bash script that installs the npm package from a tarball, starts the server, and validates the healthcheck endpoint
  • Added .github/workflows/smoke-test.yml: CI workflow that runs smoke tests on merge to main
  • Added make smoke-test: Local target for running smoke tests

Testing

The smoke test validates:

  • ✅ npm package installation from tarball
  • ✅ Binary is available in node_modules/.bin/mux
  • ✅ Server starts with mux server command
  • ✅ Healthcheck endpoint returns {"status": "ok"}
  • ✅ Root endpoint is accessible

The test includes proper cleanup (kills server, removes temp directories) and uploads server logs as artifacts on failure.

Running locally

make smoke-test

This will:

  1. Build the project
  2. Create an npm package tarball
  3. Run the smoke test in a temp directory
  4. Clean up the tarball after completion

Generated with mux

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Add comprehensive smoke test suite that validates:
- npm package installation from tarball
- server startup with 'mux server' command
- healthcheck endpoint returns valid JSON response
- root endpoint is accessible

The smoke test runs on merge to main and can also be run locally with:
  make smoke-test

Test includes:
- Proper cleanup of server processes and temp directories
- Configurable timeouts for startup and healthcheck
- Colored output for better visibility
- Server logs uploaded as artifacts on failure

_Generated with `mux`_
- Convert PACKAGE_TARBALL to absolute path before cd to avoid path resolution issues
- Add pull_request trigger to smoke-test workflow so it runs on PRs

Addresses Codex feedback about tarball path being relative after cd.

_Generated with `mux`_
- Move smoke test from standalone workflow to publish-npm.yml
- Run smoke test after build, before npm publish
- Remove smoke-test.yml standalone workflow
- Smoke test now acts as gate before publishing to npm

This ensures packages are validated before publishing rather than after merge to main.

_Generated with `mux`_
@ibetitsmike ibetitsmike added this pull request to the merge queue Nov 17, 2025
Merged via the queue into main with commit 5d553f9 Nov 17, 2025
13 checks passed
@ibetitsmike ibetitsmike deleted the chat-mi1kmowy branch November 17, 2025 15:20
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.

1 participant