Skip to content

Add CI workflow to run tests and type checking - #3

Merged
brianlovin merged 10 commits into
mainfrom
brianlovin/ci-tests-workflow
Jan 26, 2026
Merged

Add CI workflow to run tests and type checking#3
brianlovin merged 10 commits into
mainfrom
brianlovin/ci-tests-workflow

Conversation

@brianlovin

@brianlovin brianlovin commented Jan 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a CI workflow to run tests and type checking on pull requests and pushes to main.

Root Cause Investigation

Bun 1.2.0+ has a regression where the test runner segfaults during timer callback cleanup after tests complete on Linux. The crash happens in NodeTimerObject.cpp during the timer draining sequence, not during actual test execution.

Testing results:

Version Result
1.1.39 ✅ Stable (3/3 runs passed)
1.1.45 ⚠️ Intermittent crashes
1.2.10 ❌ Crashes
1.3.3 ❌ Crashes
1.3.6 ❌ Crashes

Solution: Pin Bun to 1.1.39, the newest version without this bug.

Changes

  • Add .github/workflows/ci.yml for PR/push testing
  • Update .github/workflows/publish.yml to use pinned Bun version
  • Remove continue-on-error hack from publish workflow

Related Issues

🤖 Generated with Claude Code

brianlovin and others added 10 commits January 25, 2026 17:54
Adds a GitHub Actions workflow that runs on pull requests and pushes to main. The workflow installs dependencies, runs type checking, and executes tests to ensure code quality before merging.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Bun has a known bug where it may crash during cleanup after tests pass.
This matches the approach used in publish.yml.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Instead of blindly ignoring all test step failures, parse the output
to check if tests actually passed. CI will now fail if:
- Any tests fail (e.g., "1 fail" in output)
- Tests don't run at all (no "pass" in output)

CI will pass if tests succeed but Bun crashes during cleanup.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
The CI was failing because Bun 1.3.6 has known segfault bugs on Linux
during test cleanup. These crashes happen after tests pass, not during
actual test execution.

Changes:
- Pin Bun to 1.3.3 (matches local dev version) in both workflows
- Update publish.yml to use proper test output validation instead of
  blindly ignoring failures with continue-on-error

See: oven-sh/bun#22452

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Simplify workflows to just run tests directly. If Bun 1.3.3 still
crashes, we need to dig deeper into the root cause.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Testing with an older version that predates the timer cleanup bugs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Root cause: Bun 1.2.0+ introduced a regression where the test runner
segfaults during timer callback cleanup after tests complete. The crash
happens in NodeTimerObject.cpp during the timer draining sequence, not
during test execution itself.

Testing confirmed:
- 1.1.39: passes
- 1.1.45: passes (latest 1.1.x)
- 1.2.10: crashes
- 1.3.3: crashes
- 1.3.6: crashes

Using 1.1.45 as it's the newest version without this bug.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.1.45 showed intermittent crashes, reverting to 1.1.39 which
passed consistently in earlier tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@brianlovin
brianlovin merged commit c2e8ce5 into main Jan 26, 2026
3 checks passed
@brianlovin
brianlovin deleted the brianlovin/ci-tests-workflow branch January 26, 2026 02:16
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