Skip to content

feat: add ci.yml workflow#75

Closed
don-petry wants to merge 2 commits intomainfrom
claude/issue-46-20260407-1744
Closed

feat: add ci.yml workflow#75
don-petry wants to merge 2 commits intomainfrom
claude/issue-46-20260407-1744

Conversation

@don-petry
Copy link
Copy Markdown
Contributor

Summary

  • Adds required ci.yml workflow per ci-standards.md#required-workflows
  • Gates per coding-standards.md §7: lint, build, gqlgen validate, unit + integration tests, ≥80% coverage for Go backend; tsc, eslint, prettier, graphql-codegen, jest ≥80% coverage for React Native/Expo frontend
  • Ecosystem detection mirrors dependency-audit.yml — jobs are skipped when the corresponding source tree is absent

Closes #46

Generated with Claude Code

Adds required CI workflow with lint, test, build gates for Go backend
and React Native/Expo frontend per coding-standards.md §7.

Closes #46

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 7, 2026 17:45
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 35 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 10 minutes and 35 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fa80f872-9800-47f7-b5b9-0ae5038be169

📥 Commits

Reviewing files that changed from the base of the PR and between c29026e and 88b5ce2.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-46-20260407-1744

Comment @coderabbitai help to get the list of available commands and usage tips.

The detect job uses actions/checkout which requires contents: read.
The workflow-level permissions: {} denied it implicitly.

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 7, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds the required GitHub Actions ci.yml workflow to bring the repo into compliance with the org CI workflow standard, running backend (Go) and frontend (Node/Expo) quality gates when corresponding ecosystems are present.

Changes:

  • Introduces a CI workflow with ecosystem detection and conditional execution.
  • Adds a Go backend job (lint, build, gqlgen validate, unit/integration tests, coverage gate).
  • Adds a Node frontend job (typecheck, lint, prettier, codegen check, jest coverage gate).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment on lines +43 to +47
if find . -name 'package.json' -not -path '*/node_modules/*' | grep -q .; then
echo "node=true" >> "$GITHUB_OUTPUT"
else
echo "node=false" >> "$GITHUB_OUTPUT"
fi
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The Node ecosystem detection is based on package.json, but the frontend job runs npm ci (which requires a lockfile) and the PR description says this mirrors dependency-audit.yml (which detects via package-lock.json). This can cause CI to run and then fail for repos that have a package.json but no package-lock.json (or where the lockfile is in a subdirectory). Detect package-lock.json instead (or switch install to npm install / run per found project directory).

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +37 to +41
if find . -name 'go.mod' -not -path '*/vendor/*' | grep -q .; then
echo "go=true" >> "$GITHUB_OUTPUT"
else
echo "go=false" >> "$GITHUB_OUTPUT"
fi
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

detect sets go=true if any go.mod exists anywhere in the repo, but the backend job assumes a root-module layout (go-version-file: go.mod and go build ./cmd/api/). In a monorepo (or if the Go module lives in a subdir), this will run and then fail because go.mod/cmd/api aren’t at repo root. Either restrict detection to the expected module path, or iterate over each go.mod directory and run setup/build/tests within that working directory (similar to how dependency-audit.yml loops projects).

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +110 to +120
- name: Install dependencies
run: npm ci

- name: Type check
run: npx tsc --noEmit

- name: Lint
run: npx eslint . --max-warnings 0

- name: Format check
run: npx prettier --check .
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The frontend job runs all commands at repository root (npm ci, npx tsc, eslint, prettier, jest, graphql-codegen). If the repo contains a package.json in a subdirectory (which detect would find), the job will run but fail because it isn’t cd’d into that project. Consider restricting detection to a root package.json/lockfile, or looping over each detected Node project directory and running the gates within it.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +83 to +91
- name: Coverage check (≥80% line)
run: |
go test ./... -short -count=1 -coverprofile=coverage.out
pct=$(go tool cover -func=coverage.out \
| awk '/^total:/ { gsub(/%/, "", $NF); print $NF }')
echo "Coverage: ${pct}%"
awk -v p="$pct" 'BEGIN {
if (p+0 < 80) { print "Coverage " p "% is below required 80%"; exit 1 }
}'
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The coverage gate runs go test with -short (and re-runs tests after the unit/integration steps). Per _bmad-output/planning-artifacts/coding-standards.md §7, the CI coverage command is go test -coverprofile=coverage.out (no -short). Using -short can make the enforced coverage diverge from the documented standard and from local CI expectations. Align the coverage command with the standard (and ideally avoid re-running the same tests multiple times).

Copilot uses AI. Check for mistakes.
@don-petry
Copy link
Copy Markdown
Contributor Author

Closing as stale — predates the standards PR.

This PR was generated by Claude during the original bulk-toggle yesterday, before petry-projects/.github#86 landed. That standards PR added prompt rules that:

  • Require copying from petry-projects/.github/standards/workflows/ verbatim instead of writing workflow files from scratch
  • Require verifying SHAs via gh api instead of guessing
  • Require the CodeQL actions ecosystem in the matrix where applicable
  • Allow gh api and gh label create for admin operations

Re-toggling the underlying issue will let Claude regenerate this fix using the new rules. The next run should produce a workflow that is byte-identical to the standard template (verified with the canary on TalkTerm#51 → PR #78 yesterday).

@don-petry don-petry closed this Apr 8, 2026
@don-petry don-petry deleted the claude/issue-46-20260407-1744 branch April 8, 2026 22:42
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.

Compliance: missing-ci.yml

2 participants