- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2
feat: adds github actions for build and test #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| """ WalkthroughThis change introduces GitHub Actions workflows for building, testing, and SonarQube scanning of the React Native package and its playground. It updates  Changes
 Assessment against linked issues
 Assessment against linked issues: Out-of-scope changes
 No clear out-of-scope functional code changes were found. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
 🚧 Files skipped from review as they are similar to previous changes (3)
 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit: 
 SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
 Other keywords and placeholders
 CodeRabbit Configuration File ( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (4)
package.json (1)
9-11: Test scripts look good, consider cache implications.The addition of test orchestration scripts at the root level is excellent for monorepo management. The
--no-cacheflag ensures fresh test runs which is appropriate for CI environments.Consider whether
--no-cacheis necessary for local development, as it might slow down test execution during development. You might want to create separate scripts for CI vs local development if performance becomes an issue..github/workflows/build.yml (1)
1-10: Consider paths-filter to skip builds for non-code changesThe workflow is triggered on every change to
mainand every PR. For doc-only or CI-only edits we still pay the full build cost.
Add apaths(orpaths-ignore) section underpushandpull_requestto run the build only when relevant files change.turbo.json (2)
20-23: Missingoutputsmeans no remote caching for the React-Native build
@formbricks/react-native:buildsetscache: false, so every CI run recompiles the package even if nothing changed.
If the generated artefacts are deterministic (e.g.dist/**), expose them and turn caching back on:- "@formbricks/react-native:build": { - "dependsOn": ["^build"], - "cache": false - }, + "@formbricks/react-native:build": { + "dependsOn": ["^build"], + "outputs": ["packages/react-native/dist/**"], + "cache": true + },This halves CI time for no-op PRs.
29-34: Prefercache: falseover emptyoutputsfor test tasksTurbo treats an empty
outputsarray as “cache with no outputs”, which is easy to mis-read. Use the explicit switch instead:- "test": { - "outputs": [] - }, - "test:coverage": { - "outputs": [] - }, + "test": { + "cache": false + }, + "test:coverage": { + "cache": false + },This documents intent and prevents accidental remote-cache pollution.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
- .github/workflows/build.yml(1 hunks)
- .github/workflows/test.yml(1 hunks)
- apps/playground/package.json(1 hunks)
- package.json(1 hunks)
- packages/react-native/package.json(1 hunks)
- packages/react-native/vite.config.ts(1 hunks)
- turbo.json(1 hunks)
🔇 Additional comments (7)
apps/playground/package.json (1)
9-10: LGTM! Build script addition looks good.The addition of a trailing comma and the new build script using
expo exportfollows standard practices for Expo applications. This integrates well with the CI/CD workflow setup.packages/react-native/package.json (1)
41-41: Good standardization of script naming.Renaming from "coverage" to "test:coverage" improves consistency and makes the script purpose clearer. This aligns well with the monorepo's testing strategy.
packages/react-native/vite.config.ts (2)
34-36: Good formatting improvement.The multi-line array formatting improves readability and makes future additions easier.
42-43: Excellent expansion of test coverage scope.Broadening the coverage from
src/lib/**/*.tstosrc/**/*.tswhile excludingsrc/types/**/*.tsis a smart improvement. This will provide better visibility into test coverage across the codebase while appropriately excluding type definitions that don't contain executable code..github/workflows/test.yml (2)
1-11: Well-structured workflow with appropriate triggers.The workflow name is descriptive and the trigger events (workflow_dispatch, push to main, pull requests, merge_group) are appropriate for a comprehensive CI test strategy.
24-31: Good use of pinned action versions and standard workflow steps.The pnpm installation and dependency setup steps follow best practices. Using commit hashes for action versions provides good security, and the workflow steps are logically structured.
.github/workflows/build.yml (1)
19-23: Pin the Node version explicitly
actions/setup-nodeaccepts a semver."20.x"will move to 21 the moment Node 21 becomes “latest-LTS”. If the React-Native tool-chain proves sensitive, pin to the current LTS (20.14.0) or setnode-version-file: .nvmrcto source the version from the repo.
| 
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for adding the Github Actions :-) Looks good! 👍



Fixes #9
Adds github actions for building the project and running unit tests
Summary by CodeRabbit
Chores
Refactor