Skip to content

chore: steal CI from @grammyjs/conversations - #21

Open
KnightNiwrem wants to merge 12 commits into
grammyjs:mainfrom
KnightNiwrem:claude/ci-setup-mamr2p
Open

chore: steal CI from @grammyjs/conversations#21
KnightNiwrem wants to merge 12 commits into
grammyjs:mainfrom
KnightNiwrem:claude/ci-setup-mamr2p

Conversation

@KnightNiwrem

Copy link
Copy Markdown
Member

Note

This PR was primarily written by Claude Code.

Summary

This sets up CI for the validator plugin, mirroring the workflow of @grammyjs/conversations:

  • add a GitHub Actions workflow running on pushes and pull requests against main, with four jobs: backporting via deno2node, format and lint checks, tests across Ubuntu, macOS, and Windows, and coverage upload to Codecov
  • add the corresponding deno.jsonc tasks (check, test, ok, clean, coverage, report)
  • restrict the workflow GITHUB_TOKEN to contents: read and disable checkout credential persistence in all jobs
  • ignore coverage artifacts (test/cov_profile, test/coverage, coverage.lcov) so the git clean -fX based clean task removes them

Note

CodeCov upload requires a token. The CI currently allows it to pass with error. If uploading CodeCov is desired, token needs to be set.

Validation

  • deno fmt --check
  • deno lint
  • deno test --allow-import test

Checklist

  • This PR has been manually reviewed by a human.

claude added 2 commits August 22, 2026 01:21
…ge jobs

Mirrors the CI setup of @grammyjs/conversations: a Deno-based workflow
running backporting via deno2node, format and lint checks, tests across
Linux, macOS, and Windows, and coverage upload to Codecov. Adds the
corresponding deno.jsonc tasks (check, test, ok, clean, coverage, report).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XRdjcqbadQ3X3ZpXqEp22M
- Ignore coverage artifacts (test/coverage, test/cov_profile,
  coverage.lcov) so the git clean -fX based clean task removes them,
  matching the conversations repo's .gitignore
- Restrict the workflow GITHUB_TOKEN to contents: read
- Disable checkout credential persistence in all jobs
- Upgrade codecov/codecov-action from v1.0.10 (node12-based) to v7

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XRdjcqbadQ3X3ZpXqEp22M
@KnightNiwrem
KnightNiwrem marked this pull request as ready for review August 22, 2026 04:43
Comment thread .github/workflows/deno.yml Outdated
Comment thread deno.jsonc Outdated
Comment thread deno.jsonc Outdated
Comment thread deno.jsonc Outdated
Comment thread deno.jsonc Outdated
"test": "deno test --allow-import test",
"ok": "deno fmt && deno lint && deno task test && deno task check",
"clean": "git clean -fX out test/cov_profile test/coverage coverage.lcov",
"coverage": "deno task clean && deno task test --coverage=./test/cov_profile && deno coverage --lcov --output=./coverage.lcov ./test/cov_profile",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can directly generate HTML these days, so there's no need for a separate subcommand here. I'm not sure how to reconcile this with CI, though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I didn't notice any built-in reporters that lets us directly generate HTML in deno test documentations.
ref: https://docs.deno.com/runtime/reference/cli/test/#reporters

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So this is to say that we do need a different subcommand but not a different CLI entirely. I stand corrected

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It seems like the coverage subcommand is not needed at all. Now, deno test --coverage generates both the lcov file as well as the html report.

KnightNiwrem and others added 5 commits August 22, 2026 14:56
Co-authored-by: KnorpelSenf <shtrog@gmail.com>
Co-authored-by: KnorpelSenf <shtrog@gmail.com>
Updated Deno workflow to use actions/checkout@v7 and changed cache command.
Updated the 'ok' task to remove the check for 'deno task check' and include 'deno test'.
Updated checkout action version and deno commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3f17c77c48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread deno.jsonc Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a772909c7a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/deno.yml
Comment thread .github/workflows/deno.yml
@KnightNiwrem

Copy link
Copy Markdown
Member Author

I took a slightly aggressive approach of trimming deno task, since I am not typically a fan of redundant-ish tasks - e.g. deno task test -> deno test or deno task check -> deno check.

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.

3 participants