diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ff9fbc9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # Full history so `lint:changed` can resolve the merge-base with main. + fetch-depth: 0 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: "1.3" + + - name: Install dependencies + env: + PUPPETEER_SKIP_DOWNLOAD: "true" + run: bun install --frozen-lockfile + + - name: Strict gate (format / lint / typecheck / i18n / knip / react-compiler / security / tests) + run: bun run ci diff --git a/.gitignore b/.gitignore index 2d7433b..281e62b 100644 --- a/.gitignore +++ b/.gitignore @@ -41,12 +41,6 @@ yarn-error.log* /.claude/ /.superpowers/ -# menu bar app build outputs -/menubar/.build/ -/menubar/build/ -/menubar/.swiftpm/ -/menubar/Package.resolved - # vercel .vercel diff --git a/CLAUDE.md b/CLAUDE.md index bcd3918..1e53447 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -72,9 +72,17 @@ Key priorities (in order): ## Testing the app ```bash -npm run dev # starts on 127.0.0.1:3000 +bun dev # starts on 127.0.0.1:3000 ``` +The full CI gate (formatting, typecheck, i18n, knip, react-doctor, tests) is `bun run ci`. GitHub Actions runs the same script on every PR via `.github/workflows/ci.yml`. The five strict checks the project enforces: + +- `bun run format:check` — Biome formatter +- `bun run i18n:check` — `@lingual/i18n-check` for missing / orphan i18n keys (next-intl-recommended; wrapped in `scripts/check-i18n.mjs` with a baseline ignore list) +- `bun run knip` — dead code (files, deps, unlisted deps) +- `bun run react:doctor` — `react-compiler-healthcheck` +- `bun test` — Bun's built-in Jest-compatible test runner, with `--conditions react-server` so `server-only` resolves as a no-op + For end-to-end testing without real credentials, call the setup API directly: ```typescript diff --git a/README.md b/README.md index ffb142f..24dfc74 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Encrypted. AI-categorized. Yours. [](https://sqlite.org/) [](#license) [](#features) +[](https://github.com/alon710/Spent/actions/workflows/ci.yml) @@ -36,7 +37,7 @@ Encrypted. AI-categorized. Yours. Israeli banks have terrible exports, YNAB doesn't speak ILS gracefully, and every "cloud finance" app wants you to hand over your bank password. Spent is the answer for people who'd rather just run something on their own laptop. -Your transactions get pulled directly from your bank with [`israeli-bank-scrapers`](https://github.com/eshaham/israeli-bank-scrapers), stored in a local SQLite file you can `cp` and back up like any other file, and categorized by an AI provider you choose: paid Claude, free local Ollama, or nothing at all. +Your transactions get pulled directly from your bank with [`israeli-bank-scrapers`](https://github.com/eshaham/israeli-bank-scrapers), stored in a local SQLite file you can `cp` and back up like any other file, and categorized by an AI provider you choose: paid Claude, Gemini, free local Ollama, or nothing at all. The trade-off is honest: you self-host, you trust the scraper, and you accept that banks may not love automation. In return you get a fast, beautiful, fully offline dashboard that never phones home. @@ -47,13 +48,13 @@ The trade-off is honest: you self-host, you trust the scraper, and you accept th
{t(`matchHint.${mode}`)}
+