This project uses GitHub branch protection and CI to prevent breaking changes from being merged into main.
- Protected branch:
main
- Require status checks to pass before merging: Enabled
- Required checks:
Frontend CI(workflow in.github/workflows/frontend-ci.yml)
- Require branches to be up to date before merging: Enabled
- Require a pull request before merging: Enabled
- Required approvals: At least 1 reviewer
- Allow self-approval: Disabled (recommended)
- Dismiss stale pull request approvals when new commits are pushed: Enabled
- Require conversation resolution before merging: Enabled
- Tests required for merge: Yes, where tests exist
npm testis executed in CI if atestscript is present inpackage.json.- Test failures block merges because they fail the
Frontend CIworkflow.
- Coverage thresholds: Not enforced yet.
- Future work: add coverage reporting (e.g. Jest/Vitest coverage or Codecov) and enforce minimum thresholds when the test suite is stable.
- Failed CI checks block merges: Yes (recommended and assumed here)
- Lint errors
- TypeScript errors
- Test failures
- Build failures
Developers should fix issues locally before re-running CI:
npm run lintnpm run type-checknpm testnpm run build
Pre-commit hooks are recommended to catch issues earlier but are not required by this configuration.
If you decide to use Husky:
-
Install Husky and lint-staged:
npm install --save-dev husky lint-staged
-
Enable Husky:
npx husky init
-
Configure a minimal
pre-commithook to keep it fast, for example:npx lint-staged
-
Example
package.jsonadditions (conceptual, adapt to your setup):{ "lint-staged": { "*.{ts,tsx,js,jsx}": "eslint --fix" }, "scripts": { "type-check": "tsc --noEmit" } }
You can also add a pre-push hook to run npm run type-check or a fast subset of tests, but keep it lightweight to avoid blocking developer workflows.