Add CI: lint, format, and test on main + PRs#33
Merged
Conversation
Runs oxlint, oxfmt --check, and bun test on every push to main and on pull requests, using the pinned Bun 1.3.14 with a frozen lockfile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
picocolors decides isColorSupported once at import time and enables color whenever $CI is set, ignoring whether stdout is a TTY. So `moi env` — captured through a pipe by agents and CI runners — emitted ANSI escapes instead of plain text. Setting NO_COLOR in cli-colors.ts could not fix it: Bun evaluates picocolors early enough that the env mutation never reaches it (that trick only worked for citty, and locally only because the non-TTY path already disabled color when $CI was absent). Add cli-pc.ts, which builds picocolors via createColors() with enablement we compute ourselves: honor NO_COLOR / FORCE_COLOR, else key off isTTY alone — never auto-enable on CI. Point both CLI color call sites (cli.ts, cli-env.ts) at it. Surfaced by the new CI workflow: 4 moi env tests failed on Linux CI (which sets $CI) while passing locally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sets up very simple CI. A single job on
ubuntu-latestthat, on every push tomainand on every pull request:engines) viaoven-sh/setup-bunbun install --frozen-lockfilebun run lint(oxlint)bun run format:check(oxfmt)bun test(318 tests)Concurrency is set to cancel superseded runs on the same ref.
Typecheck (
tsc --noEmit) is intentionally left out for now: the suite includes a deliberately-brokensyntax-error.tsxfixture, so a repo-wide typecheck needs fixture exclusion first — a separate follow-up if wanted.🤖 Generated with Claude Code