|
| 1 | +# Developer Setup |
| 2 | + |
| 3 | +This guide provides generic onboarding defaults intended for template-based repositories. |
| 4 | + |
| 5 | +## 1) Prerequisites |
| 6 | + |
| 7 | +- Git 2.40+ |
| 8 | +- A language runtime/toolchain for your project (Node, Python, Go, etc.) |
| 9 | +- A package manager (`npm`, `pnpm`, `pip`, `poetry`, `go`, etc.) |
| 10 | + |
| 11 | +## 2) Bootstrap locally |
| 12 | + |
| 13 | +```bash |
| 14 | +git clone <your-repo-url> |
| 15 | +cd <your-repo> |
| 16 | +./scripts/bootstrap.sh |
| 17 | +``` |
| 18 | + |
| 19 | +If your repository is not Node.js based, adapt `scripts/bootstrap.sh` to your stack and keep command names consistent with CI. |
| 20 | + |
| 21 | +## 3) Recommended task contract |
| 22 | + |
| 23 | +To keep automation portable, define task commands with predictable names: |
| 24 | + |
| 25 | +- `format:check` — formatting validation |
| 26 | +- `lint` — static analysis/linting |
| 27 | +- `test` — automated tests |
| 28 | + |
| 29 | +This template's reusable workflow can call any shell command, but these names improve discoverability. |
| 30 | + |
| 31 | +## 4) CI customization |
| 32 | + |
| 33 | +The repository ships with: |
| 34 | + |
| 35 | +- `.github/workflows/reusable-quality.yml` (reusable workflow) |
| 36 | +- `.github/workflows/ci.yml` (default entry workflow) |
| 37 | +- `.github/workflows/release.yml` (semantic release PR/tag automation) |
| 38 | + |
| 39 | +In `ci.yml`, enable checks by setting: |
| 40 | + |
| 41 | +- `setup-node: true` for JS/TS projects |
| 42 | +- `run-format-check: true` |
| 43 | +- `run-lint: true` |
| 44 | +- `run-test: true` |
| 45 | + |
| 46 | +Then optionally override commands: |
| 47 | + |
| 48 | +```yaml |
| 49 | +with: |
| 50 | + setup-node: true |
| 51 | + format-command: npm run format:check |
| 52 | + lint-command: npm run lint |
| 53 | + test-command: npm test |
| 54 | +``` |
| 55 | +
|
| 56 | +## 5) Branch and PR workflow |
| 57 | +
|
| 58 | +1. Create a branch from `main`. |
| 59 | +2. Run local validation commands before opening a PR. |
| 60 | +3. Open a focused PR and include context for reviewers. |
| 61 | +4. Merge only when CI checks pass. |
| 62 | + |
| 63 | +## 6) Lightweight automation standards |
| 64 | + |
| 65 | +- Keep workflows minimal and composable. |
| 66 | +- Prefer reusable workflows (`workflow_call`) over duplicated YAML. |
| 67 | +- Avoid stack-specific assumptions in template defaults. |
| 68 | +- Keep commands configurable through workflow inputs. |
| 69 | +- Fail fast in CI and keep logs clear. |
0 commit comments