Skip to content

ci: GitHub Actions tests + Codecov coverage - #6

Merged
7a6163 merged 5 commits into
mainfrom
ci/github-actions-codecov
Oct 21, 2026
Merged

7a6163 merged 5 commits into
mainfrom
ci/github-actions-codecov

Conversation

@7a6163

@7a6163 7a6163 commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Why

The project had no CI. Tests only ran when someone remembered to run them locally, and nobody could see the coverage.

What changed

  • New .github/workflows/ci.yml, triggered by pushes to main and by PRs. On Node 24 (current LTS) it runs:
    1. npm install (no lockfile is committed, so npm ci can't be used)
    2. npm run typecheck
    3. npm run test:coverage
    4. an upload of lcov.info to Codecov
  • The upload uses OIDC (id-token: write), so there is no CODECOV_TOKEN secret to manage.
  • The actions are on their latest major versions: actions/checkout@v7, actions/setup-node@v7, codecov/codecov-action@v7.
  • New test:coverage script, built on Node's built-in --experimental-test-coverage, which writes lcov.info. The file is added to .gitignore.
  • "type": "module" in package.json makes Node stop reparsing the .ts files and removes the MODULE_TYPELESS_PACKAGE_JSON warning. wrangler deploy --dry-run is unaffected.
  • Also fixes the LICENSE year from chore: add MIT license #5: 2025 → 2026.
  • README gets CI and Codecov badges; CLAUDE.md mentions CI.

Current coverage: 81% of lines.

Testing

  • npm run test:coverage locally: 24 passed, lcov.info produced
  • npm run typecheck passes
  • First CI run on this PR passed, and the Codecov upload via OIDC succeeded

🤖 Generated with Claude Code

…ecov

- New ci.yml on push to main and PRs: Node 24, typecheck, test:coverage,
  Codecov upload via OIDC (no CODECOV_TOKEN secret). Uses the latest
  actions/checkout@v7, actions/setup-node@v7, codecov/codecov-action@v7.
- Add test:coverage script producing lcov.info (ignored by git).
- Set "type": "module" so Node stops reparsing the .ts files and drops
  the MODULE_TYPELESS_PACKAGE_JSON warning; wrangler dry-run unaffected.
- CI and Codecov badges in README; CLAUDE.md mentions CI.
@7a6163
7a6163 force-pushed the ci/github-actions-codecov branch from bf331bc to 1831840 Compare October 21, 2026 08:30
@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

Without a lockfile every install resolved the newest versions in range,
so audited, tested and deployed dependencies could differ. CI now
installs exactly the locked tree with npm ci (cached) and fails on any
high or critical npm audit finding.
TypeScript 7 (native compiler) no longer auto-includes every @types
package: "types" now defaults to [], so list "node" explicitly for
node:test, node:assert and import.meta.dirname in the tests.
@7a6163 7a6163 mentioned this pull request Oct 21, 2026
4 of 5 tasks
build: upgrade TypeScript to 7
@7a6163
7a6163 merged commit 688b80f into main Oct 21, 2026
1 check 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