Set up Claude GitHub Action and CI for the Definition of Done #30

Closed
opened 2026-11-06 02:11:38 +00:00 by chris-kreidl · 1 comment
chris-kreidl commented 2026-11-06 02:11:38 +00:00 (Migrated from github.com)

As the product owner, I want @claude on GitHub and automatic checks on every PR, so that work done on GitHub meets the same Definition of Done as local work.

Acceptance criteria

  • CI workflow runs bun test, bun check, and bun fmt --check (changed files only, until #11 formats the old scripts) on every PR
  • The @claude workflow installs Bun and is allowed to run bun install, bun test, bun check, bun fmt
  • Bun version is pinned in one place (package.json) and used by every workflow
  • Project conventions (branches, Definition of Done, PR rules, data limits on GitHub) are in CLAUDE.md, the only instructions the GitHub-side Claude reads

Definition of Done

  • Acceptance criteria met and demonstrated
  • bun test passes; new logic has tests
  • bun check is clean and bun fmt --check passes
  • Runs end to end on real data (not just fixtures). For this story: CI passes on its own PR
  • Committed with Closes #<this issue>
*As the product owner, I want @claude on GitHub and automatic checks on every PR, so that work done on GitHub meets the same Definition of Done as local work.* ### Acceptance criteria - [ ] CI workflow runs `bun test`, `bun check`, and `bun fmt --check` (changed files only, until #11 formats the old scripts) on every PR - [ ] The @claude workflow installs Bun and is allowed to run `bun install`, `bun test`, `bun check`, `bun fmt` - [ ] Bun version is pinned in one place (`package.json`) and used by every workflow - [ ] Project conventions (branches, Definition of Done, PR rules, data limits on GitHub) are in `CLAUDE.md`, the only instructions the GitHub-side Claude reads ### Definition of Done - [ ] Acceptance criteria met and demonstrated - [ ] `bun test` passes; new logic has tests - [ ] `bun check` is clean and `bun fmt --check` passes - [ ] Runs end to end on real data (not just fixtures). For this story: CI passes on its own PR - [ ] Committed with `Closes #<this issue>`
claude[bot] commented 2026-11-06 02:11:52 +00:00 (Migrated from github.com)

Claude finished @chris-kreidl's task in 35s —— View job • claude/issue-30-20261106-0211 • Create PR ➔


Partly done: workflow files need you

  • Pin Bun in package.json ("packageManager": "[email protected]")
  • Add branch, Definition of Done, PR and data-limit conventions to CLAUDE.md
  • CI workflow and claude.yml changes: not done. My GitHub App can't modify .github/workflows, so you'll need to add them (YAML below).
  • Not verified: I couldn't run bun test, bun check or bun fmt here (Bun commands needed approval), and CI hasn't run.

Check the Bun version. I chose 1.3.5 from the bun.lock entry for @types/bun. I couldn't run bun --version. Set it to whatever you run locally (it must support bun check and bun fmt).

Workflow changes for you to apply

New .github/workflows/ci.yml:

name: CI
on:
  pull_request:
jobs:
  checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: oven-sh/setup-bun@v2
        with:
          bun-version-file: package.json
      - run: bun install --frozen-lockfile
      - run: bun test
      - run: bun check
      - name: Format check (changed files only, until #11)
        run: |
          files=$(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD -- '*.ts' '*.json' '*.toml' | grep -v '^test/fixtures/companyfacts/' || true)
          [ -z "$files" ] || bun fmt --check $files

In .github/workflows/claude.yml, add these steps before "Run Claude Code":

      - uses: oven-sh/setup-bun@v2
        with:
          bun-version-file: package.json
      - run: bun install --frozen-lockfile

Also add this input to the claude-code-action step's with: block:

          claude_args: '--allowedTools "Bash(bun install:*),Bash(bun test:*),Bash(bun check:*),Bash(bun fmt:*)"'

Optionally, give claude-code-review.yml the same setup-bun step. Note that bun fmt --check $files is my guess at how to pass file arguments, and I haven't tested it. Fix it if it doesn't work.

Once these are in, CI should run on the PR and cover the "CI passes on its own PR" item.

· Branch

**Claude finished @chris-kreidl's task in 35s** —— [View job](https://github.com/chris-kreidl/screener/actions/runs/42148739371) • [`claude/issue-30-20261106-0211`](https://github.com/chris-kreidl/screener/tree/claude/issue-30-20261106-0211) • [Create PR ➔](https://github.com/chris-kreidl/screener/compare/main...claude/issue-30-20261106-0211?quick_pull=1&title=Set%20up%20Claude%20GitHub%20Action%20and%20CI%20for%20the%20Definition%20of%20Done&body=Closes%20%2330%0A%0APins%20Bun%20in%20package.json%20and%20documents%20GitHub%20conventions%20in%20CLAUDE.md.%20The%20workflow%20files%20still%20need%20to%20be%20added%20manually%20%28see%20the%20issue%20comment%29.%0A%0AGenerated%20with%20%5BClaude%20Code%5D%28https%3A%2F%2Fclaude.ai%2Fcode%29) --- ### Partly done: workflow files need you - [x] Pin Bun in `package.json` (`"packageManager": "[email protected]"`) - [x] Add branch, Definition of Done, PR and data-limit conventions to `CLAUDE.md` - [ ] **CI workflow and `claude.yml` changes: not done.** My GitHub App can't modify `.github/workflows`, so you'll need to add them (YAML below). - [ ] Not verified: I couldn't run `bun test`, `bun check` or `bun fmt` here (Bun commands needed approval), and CI hasn't run. **Check the Bun version.** I chose `1.3.5` from the `bun.lock` entry for `@types/bun`. I couldn't run `bun --version`. Set it to whatever you run locally (it must support `bun check` and `bun fmt`). ### Workflow changes for you to apply New `.github/workflows/ci.yml`: ```yaml name: CI on: pull_request: jobs: checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: oven-sh/setup-bun@v2 with: bun-version-file: package.json - run: bun install --frozen-lockfile - run: bun test - run: bun check - name: Format check (changed files only, until #11) run: | files=$(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD -- '*.ts' '*.json' '*.toml' | grep -v '^test/fixtures/companyfacts/' || true) [ -z "$files" ] || bun fmt --check $files ``` In `.github/workflows/claude.yml`, add these steps before "Run Claude Code": ```yaml - uses: oven-sh/setup-bun@v2 with: bun-version-file: package.json - run: bun install --frozen-lockfile ``` Also add this input to the `claude-code-action` step's `with:` block: ```yaml claude_args: '--allowedTools "Bash(bun install:*),Bash(bun test:*),Bash(bun check:*),Bash(bun fmt:*)"' ``` Optionally, give `claude-code-review.yml` the same `setup-bun` step. Note that `bun fmt --check $files` is my guess at how to pass file arguments, and I haven't tested it. Fix it if it doesn't work. Once these are in, CI should run on the PR and cover the "CI passes on its own PR" item. · [Branch](https://github.com/chris-kreidl/screener/tree/claude/issue-30-20261106-0211)
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ckreidl/screener#30
No description provided.