ci: add GitHub Actions workflow (bootstrap for #158)#161
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a GitHub Actions workflow at Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub as "GitHub Actions"
participant Repo as "Repository"
participant Lint as "lint job\n(Node.js 22 / npm)"
participant Kotlin as "kotlin-tests job\n(Java 17 / Gradle)"
participant Build as "build job\n(Node.js 22 / npm)"
GitHub->>Repo: Trigger on push / pull_request to master
GitHub->>Lint: start lint job
GitHub->>Kotlin: start kotlin-tests job
Lint->>Repo: actions/checkout@v4\nactions/setup-node@v4\nnpm ci\nnpm run lint
Kotlin->>Repo: actions/checkout@v4\nactions/setup-java@v4\n./gradlew test (test-runner)
Lint-->>GitHub: lint job completes
Kotlin-->>GitHub: kotlin-tests completes
GitHub->>Build: start build job (after lint & kotlin-tests)
Build->>Repo: actions/checkout@v4\nactions/setup-node@v4\nnpm ci\nnpm run prepare
Build-->>GitHub: build completes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
18-19: Pin GitHub Actions to full commit SHAs instead of floating version tags.Using mutable version tags increases supply-chain drift risk. Replace floating tags with full-length commit SHAs for
actions/checkout,actions/setup-node, andactions/setup-javaacross all workflow jobs:
- Lines 18-19, 30-31, 42-43:
actions/checkout@v4andactions/setup-node@v4- Lines 54-55:
actions/checkout@v4andactions/setup-java@v4- Lines 69-70:
actions/checkout@v4andactions/setup-node@v4🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yml around lines 18 - 19, Replace floating version tags for GitHub Actions with pinned full commit SHAs: find occurrences of "actions/checkout@v4", "actions/setup-node@v4", and "actions/setup-java@v4" in the workflow and replace each tag with the corresponding full commit SHA for that action (e.g., actions/checkout@<full-sha>, actions/setup-node@<full-sha>, actions/setup-java@<full-sha>) so every job uses the exact pinned revision instead of the mutable tag.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 1-13: Add an explicit workflow-level permissions block to the
top-level of this workflow (the one beginning with "name: CI") to enforce least
privilege; insert a top-level permissions key containing at minimum "contents:
read" (or other minimal permissions required) so the workflow no longer relies
on implicit repo/org defaults.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 18-19: Replace floating version tags for GitHub Actions with
pinned full commit SHAs: find occurrences of "actions/checkout@v4",
"actions/setup-node@v4", and "actions/setup-java@v4" in the workflow and replace
each tag with the corresponding full commit SHA for that action (e.g.,
actions/checkout@<full-sha>, actions/setup-node@<full-sha>,
actions/setup-java@<full-sha>) so every job uses the exact pinned revision
instead of the mutable tag.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4fc83e80-ee69-4192-af25-8467baf407e5
📒 Files selected for processing (1)
.github/workflows/ci.yml
Bootstrap workflow with the jobs that pass on current master: lint, Kotlin tests, and build. TypeScript and unit test jobs are added in #158 alongside the fixes they need (tsconfig exclude, passWithNoTests). Co-authored-by: Claude <claude@anthropic.com>
add2b9e to
b77ffee
Compare
Address CodeRabbit feedback: - Pin actions/checkout, actions/setup-node, actions/setup-java to full commit SHAs to reduce supply-chain risk - Add workflow-level permissions: contents: read for least privilege Co-authored-by: Claude <claude@anthropic.com>
Align with #161: pin actions/checkout, actions/setup-node, actions/setup-java to full commit SHAs and add workflow-level permissions: contents: read for least privilege. Co-authored-by: Claude <claude@anthropic.com>
Align with #161: pin actions/checkout, actions/setup-node, actions/setup-java to full commit SHAs and add workflow-level permissions: contents: read for least privilege. Co-authored-by: Claude <claude@anthropic.com>
Align with #161: pin actions/checkout, actions/setup-node, actions/setup-java to full commit SHAs and add workflow-level permissions: contents: read for least privilege. Co-authored-by: Claude <claude@anthropic.com>
esarafianou
left a comment
There was a problem hiding this comment.
Just a minor comment.
Node 18 reached end-of-life. Node 20 reaches EOL in May 2026. Use Node 22 LTS for longer support runway. Co-authored-by: Claude <claude@anthropic.com>
Builds on #161 (which added the base CI workflow with lint, Kotlin tests, and build). This commit adds the remaining two jobs: - TypeScript — npm run typescript (tsc --noEmit) - Unit Tests — npm test -- --coverage --passWithNoTests Fixes: - TypeScript: exclude example/ from tsconfig.json (references React Navigation deps only in example/node_modules) - Unit Tests: --passWithNoTests since repo has no JS/TS test files (all tests are Kotlin in test-runner/) Build job now depends on all four check jobs. Co-authored-by: Claude <claude@anthropic.com>
…158) * ci: add TypeScript and unit test jobs, fix pre-existing CI failures Builds on #161 (which added the base CI workflow with lint, Kotlin tests, and build). This commit adds the remaining two jobs: - TypeScript — npm run typescript (tsc --noEmit) - Unit Tests — npm test -- --coverage --passWithNoTests Fixes: - TypeScript: exclude example/ from tsconfig.json (references React Navigation deps only in example/node_modules) - Unit Tests: --passWithNoTests since repo has no JS/TS test files (all tests are Kotlin in test-runner/) Build job now depends on all four check jobs. Co-authored-by: Claude <claude@anthropic.com> * ci: remove no-op Jest unit-tests job There are zero JS/TS test files in this repo, so the Jest job was burning ~60-90s of CI time per run for nothing. Removed per reviewer feedback — can re-add when JS/TS tests are introduced. Co-authored-by: Claude <claude@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com>
Adds the GitHub Actions CI workflow to master with the jobs that already pass: lint, Kotlin tests, and build.
TypeScript and unit test jobs are intentionally excluded here — they require fixes (
tsconfig.jsonexclude forexample/,--passWithNoTestsfor Jest) that come in #158.Merge order:
Release Note