Skip to content

ci: add typecheck/test/build gate on PR and main - #2

Merged
shadowbrush merged 1 commit into
mainfrom
ci/add-build-test-gate
Jul 6, 2026
Merged

shadowbrush merged 1 commit into
mainfrom
ci/add-build-test-gate

Conversation

@shadowbrush

Copy link
Copy Markdown
Member

Why

Komodo builds + redeploys this service's image on every push to main (Deployment redeploy_on_build) with no check in between — and the repo had no CI at all. That's the "no gate" half of hadron-memory/hadron-server#503: the /convert/html-to-markdown route was merged (2026-07-03) but never validated, and the stale image kept serving a 404 for web-page clips until it was manually rebuilt.

What

A GitHub Actions workflow that runs on every PR and on main:

  • npm ci
  • npm run typecheck
  • npm test
  • npm run build (full tsc)

Puppeteer's Chromium download is skipped (PUPPETEER_SKIP_DOWNLOAD) for speed/reliability — the markdown→PDF render tests already self-skip when Chromium can't launch, so the suite stays fast and green while still covering the html/pdf/markdown conversion logic. Enabling the render path later is a one-line change (drop the env var, add npx puppeteer browsers install chrome).

Validated locally: typecheck clean, 22 passed / 2 skipped, build exits 0.

Follow-up (not in this PR)

  • The GitHub→Komodo build webhook was also missing on this repo (now added out-of-band, mirroring hadron-server) and the Deployment's redeploy_on_build was off (now on) — those were the "didn't deploy" half of the same incident.

🤖 Generated with Claude Code

Komodo builds + redeploys this service's image on every push to main
(Deployment redeploy_on_build) with no check in between, so a broken
merge ships straight to the alpha container. There was no CI at all.

Add a GitHub Actions workflow that runs typecheck, tests, and a full
tsc build on every PR and on main. Puppeteer's Chromium download is
skipped (PUPPETEER_SKIP_DOWNLOAD) for speed/reliability — the render
tests already self-skip when Chromium can't launch, so the suite stays
green and fast while still covering the html/pdf/markdown conversion
logic (incl. the html-to-markdown route from hadron-server#503).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a first CI “gate” workflow so PRs and main pushes must pass typecheck, tests, and a full TypeScript build before the repo’s auto-build/redeploy path can ship a broken change.

Changes:

  • Add GitHub Actions workflow triggered on pull_request and push to main.
  • Run npm ci, npm run typecheck, npm test (vitest), and npm run build.
  • Skip Puppeteer’s Chromium download in CI via PUPPETEER_SKIP_DOWNLOAD while keeping browser-dependent tests self-skipping when Chromium can’t launch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shadowbrush
shadowbrush merged commit 646fd12 into main Jul 6, 2026
2 checks passed
@shadowbrush
shadowbrush deleted the ci/add-build-test-gate branch July 6, 2026 01:49
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