Add CI and packaging workflow#9
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR establishes end-to-end GitHub Actions CI/CD automation for LinguistMac, including code quality tooling configuration, build script refactoring to support CI execution, a four-job workflow for linting/formatting/building/testing/analysis, unsigned app artifact delivery, and developer documentation for local parity. ChangesCI/CD Infrastructure and Automation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Line 25: Replace mutable workflow tags with pinned commit SHAs: find the lines
using "uses: actions/checkout@v4" and "uses: actions/upload-artifact@v4" in the
workflow and update each to the corresponding full commit SHA for the specific
release you intend to use (e.g., actions/checkout@<full-sha>,
actions/upload-artifact@<full-sha>), ensuring all occurrences (the multiple
checkout lines and the upload-artifact line) are replaced so the workflow uses
immutable references.
- Around line 24-25: Update every GitHub Actions checkout step that uses "uses:
actions/checkout@v4" to disable credential persistence by adding a with block
containing "persist-credentials: false"; specifically modify each checkout
invocation (the occurrences with the literal "uses: actions/checkout@v4") so it
includes a with: persist-credentials: false entry, ensuring all four instances
noted are changed so the runner token is not persisted in git config for later
steps.
- Around line 40-41: Update the "Run SwiftLint" job's step named "Run SwiftLint"
to invoke swiftlint analyze (not swiftlint lint) and ensure the job provides the
required compiler-log inputs (e.g., build output / compile_commands or Xcode
build logs) that swiftlint analyze needs so analyzer_rules like
unused_declaration and unused_import run; in the same workflow update the
actions/checkout@v4 usages to include persist-credentials: false (if the job
does not need authenticated git) and replace tag-pinned action references (e.g.,
actions/checkout@v4 and any other `@vX` usages) with the corresponding commit SHA
pins to reduce supply-chain risk.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f5e1677c-1b8d-487d-8d9f-21a5264d7352
📒 Files selected for processing (6)
.github/workflows/ci.yml.swiftformat.swiftlint.ymlTests/LinguistMacCoreTests/AppFeatureTests.swiftdocs/ci-cd.mdscript/build_and_run.sh
Summary
CIworkflow for pull requests, pushes tomain, and manual runsmainpushes and manual dispatches--packagemode toscript/build_and_run.shso CI can build the.appbundle without launching itValidation
bash -n script/build_and_run.shruby -e 'require "yaml"; YAML.load_file(".github/workflows/ci.yml"); puts "workflow yaml ok"'git diff --checkswift build --product LinguistMacswift test./script/build_and_run.sh --packagetest -x dist/LinguistMac.app/Contents/MacOS/LinguistMacplutil -lint dist/LinguistMac.app/Contents/Info.plistxcodebuild -scheme LinguistMac -destination platform=macOS -derivedDataPath /tmp/linguistmac-ci-derived CODE_SIGNING_ALLOWED=NO buildxcodebuild -scheme LinguistMac -destination platform=macOS -derivedDataPath /tmp/linguistmac-ci-derived-test CODE_SIGNING_ALLOWED=NO testNotes
Closes #4
Summary by CodeRabbit
Documentation
Chores