ci: add GitHub Actions workflow modeled on @grammyjs/conversations
Merged
KN
3mo ago+119+119+012345678901234567890123456789-1-1-0123456789
Sets up CI for this repo, mirroring the workflow used by @grammyjs/conversations.
Changes
.github/workflows/deno.yml— runs on pushes and PRs targetingmain, with four jobs:- backport:
npm install --ignore-scripts+npm run backport(deno2node build). Adds asetup-nodestep pinned to Node 24 to match this package'senginesrequirement — the only structural addition over the conversations workflow. - format-and-lint:
deno fmt --checkanddeno lint. - test:
deno task check+deno task teston a matrix of Ubuntu, macOS, and Windows. - coverage:
deno task coveragewith LCOV upload to Codecov.
- backport:
deno.jsonc— adds the task definitions the workflow relies on (check,test,ok,clean,coverage,report), adapted from conversations to this repo's layout (src/mod.ts,test/), and excludestest/cov_profilefrom fmt/lint.
Validation
All CI steps were run locally with Deno 2.9.5:
deno fmt --check,deno lint, anddeno task checkpass.deno task test: all 23 tests pass.npm install --ignore-scripts && npm run backportbuildsout/mod.jsandout/mod.d.tscleanly.
Note: the coverage job uploads to Codecov without a token, which works for public repos on codecov-action@v1 (same as conversations). If uploads are flaky, the action can be bumped to v4+ with a CODECOV_TOKEN secret.
Generated by Claude Code
Summary by cubic
Adds GitHub Actions CI modeled on @grammyjs/conversations. Previously no CI; now pushes and PRs to main run backporting, format/lint, a cross-OS test matrix, and coverage upload via codecov/codecov-action@v7, with restricted permissions.
.github/workflows/deno.yml: four jobs — backport (Node 24 viaactions/setup-node@v4), format/lint (denoland/setup-deno@v2), tests on Ubuntu/macOS/Windows, and coverage (LCOV upload usingcodecov/codecov-action@v7); workflow scopespermissions: contents: readand disables checkout credential persistence.deno.jsonc: adds taskscheck,test,ok,clean,coverage,report; excludestest/cov_profilefrom fmt/lint..gitignore: ignores coverage artifacts (test/coverage,test/cov_profile,coverage.lcov) to align with the clean task.
Summary by CodeRabbit
-
Tests
- Expanded automated testing across macOS, Windows, and Ubuntu environments.
- Added test coverage collection and reporting to help maintain reliability.
-
Chores
- Added automated checks for formatting, linting, and validation on code changes.
- Added development tasks for running checks, cleaning generated files, and viewing coverage reports.