Skip to content

ci: build, test and lint on main and PRs - #6

Merged
ksambhi merged 8 commits into
mainfrom
ci/add-workflow
Oct 22, 2026
Merged

ksambhi merged 8 commits into
mainfrom
ci/add-workflow

Conversation

@ksambhi

@ksambhi ksambhi commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds .github/workflows/ci.yml, running on pushes to main and on every pull request:

  • Build: npm run build --workspaces (mailmerge, mailmerge-cli, util)
  • Test: build, then jest across all workspaces
  • Lint: ESLint and Prettier check

Safety guards

  • Uses pull_request, not pull_request_target, so fork PRs get a read-only token and no secrets
  • permissions: contents: read
  • persist-credentials: false on checkout, and npm ci --ignore-scripts
  • Concurrency cancels superseded PR runs, never runs on main
  • Job timeouts

Also resyncs package-lock.json: npm ci was failing because @docsoc/util@2.0.2 was missing from the lock file.

Known failures on main (not fixed here)

These are pre-existing, so the checks will be red until they're addressed:

  • Lint: .eslintrc.json references @nx/eslint-plugin, which isn't installed
  • Prettier: format:check flags 59 files
  • Test: 3 suites (rerender, send, generate specs) fail with TS2578 unused @ts-expect-error

Suggest fixing these in follow-ups, then marking the checks as required in branch protection.


Generated by Claude Code

Also resync package-lock.json so `npm ci` works.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6DfpwXUAAjRgZCnT9v8eT
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6DfpwXUAAjRgZCnT9v8eT
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6DfpwXUAAjRgZCnT9v8eT
The action appends jest flags to test-script and runs it without a shell,
so the chained build command swallowed them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6DfpwXUAAjRgZCnT9v8eT
@github-actions

Copy link
Copy Markdown

Coverage report

St.❔
Category Percentage Covered / Total
🟢 Statements 82.44% 582/706
🔴 Branches 55.26% 105/190
🟡 Functions 77.23% 78/101
🟢 Lines 82.65% 562/680

Test suite run success

86 tests passing in 17 suites.

Report generated by 🧪jest coverage report action from 41df600

@ksambhi
ksambhi merged commit 413833f into main Oct 22, 2026
3 of 4 checks passed
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