Skip to content

Add CI: lint, format, and test on main + PRs#33

Merged
molefrog merged 2 commits into
mainfrom
ci/github-actions
Jul 8, 2026
Merged

Add CI: lint, format, and test on main + PRs#33
molefrog merged 2 commits into
mainfrom
ci/github-actions

Conversation

@molefrog

@molefrog molefrog commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Sets up very simple CI. A single job on ubuntu-latest that, on every push to main and on every pull request:

  1. Installs Bun 1.3.14 (matches local / engines) via oven-sh/setup-bun
  2. bun install --frozen-lockfile
  3. bun run lint (oxlint)
  4. bun run format:check (oxfmt)
  5. 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-broken syntax-error.tsx fixture, so a repo-wide typecheck needs fixture exclusion first — a separate follow-up if wanted.

🤖 Generated with Claude Code

molefrog and others added 2 commits July 8, 2026 11:02
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>
@molefrog molefrog merged commit c0f8eef into main Jul 8, 2026
1 check passed
@molefrog molefrog deleted the ci/github-actions branch July 8, 2026 08:09
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