CI/CD
GitHub Actions pipeline runs on all pushes and/or PRs to main and sprint* branches
Pipeline
Setup -> Lint -> Type Check -> Test -> Build (iOS + Android + Web)
CI file: .github/workflows/ci.yml
Branch Strategy
main
└── sprint*
├── feature-*
├── fix-*
└── docs-*
- Never commit directly to
mainor sprint branches, PRs only(ensured by branch rulesets, enabled on main, sprint*) - PRs require at least 2 team member reviews on
sprint*, and 3 onmain - Sprint ->
mainPRs require Scrum Master approval(as per CODEOWNERS) - Feature branches must reference a GitHub Issue (
resolve #...in PR description) - Issues should be closed automatically by GitHub via PR on merge
- All releases from
main
Local Checks (run before pushing)
From the project root:
Run: make test
- This runs full CI pipeline locally (lint, typecheck, tests with coverage, and build verification)
PR Workflow
- Push changes to your branch
- pull changes from dev(
sprint*branch) - and create PR to
sprint*branch
Diagnosing Failures
Lint
- To Auto Fix(whatever part is possible):
npm run lint:fix && npm run lint
| Error | Fix |
|---|---|
no-unused-vars |
Remove unused import/var |
no-console |
Wrap with if (__DEV__) |
eqeqeq |
Use === |
no-explicit-any |
Add proper type |
react/jsx-key |
Add key={item.id} to list elements |
Type Check
npx tsc --noEmit
// implicit any -> add type
function handle(event: GestureResponderEvent) {}
// null not handled -> narrow first
const { id } = useLocalSearchParams<{ id: string }>();
if (!id) return null;
Test Failures
npm test -- --verbose
npm test -- --clearCache
Build Failures
make clean && make install # Clean + reinstall dependencies
make build-web # or build-ios / build-android
make test # Verify full pipeline locally
If SDK mismatch persists:
npx expo install --fix
Common CI Errors
| Error | Fix |
|---|---|
Cannot find module '@/...' |
Check tsconfig.json path aliases |
package-lock.json missing |
Commit the lock file |
| Expo version mismatch | npx expo install --fix locally and commit |
| Test timeout | Increase waitFor timeout or add missing await |