-
Notifications
You must be signed in to change notification settings - Fork 1
Repo Tooling #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Repo Tooling #211
Changes from all commits
dcf4d78
80b6d68
2a6a75d
7efe7aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,89 @@ | ||||||||||||||||||||||||||||
| name: CI | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||
| branches: [main] | ||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||
| branches: [main] | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Cancel in-progress runs for the same PR/branch when a new push lands. | ||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||
| group: ${{ github.workflow }}-${{ github.ref }} | ||||||||||||||||||||||||||||
| cancel-in-progress: true | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||
| js: | ||||||||||||||||||||||||||||
| name: JS (${{ matrix.package }}) | ||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||
| package: | ||||||||||||||||||||||||||||
| - "." # root tooling package (lint-staged + simple-git-hooks + prettier) | ||||||||||||||||||||||||||||
| - frontend | ||||||||||||||||||||||||||||
| - mythos | ||||||||||||||||||||||||||||
| - dbSchema | ||||||||||||||||||||||||||||
| - sdk/sdk-typescript | ||||||||||||||||||||||||||||
| - playground/merchant-express | ||||||||||||||||||||||||||||
| - playground/merchant-fastify | ||||||||||||||||||||||||||||
| - playground/merchant-hono | ||||||||||||||||||||||||||||
| - playground/merchant-nextjs | ||||||||||||||||||||||||||||
| - scripts/test-transaction | ||||||||||||||||||||||||||||
| defaults: | ||||||||||||||||||||||||||||
| run: | ||||||||||||||||||||||||||||
| working-directory: ${{ matrix.package }} | ||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| node-version: "20" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Corepack reads each package.json's `packageManager` pin and uses | ||||||||||||||||||||||||||||
| # exactly that pnpm version, regardless of any globally-installed pnpm. | ||||||||||||||||||||||||||||
| - name: Enable Corepack | ||||||||||||||||||||||||||||
| run: corepack enable | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # The load-bearing line of this whole workflow: refuses to mutate the | ||||||||||||||||||||||||||||
| # lockfile and exits non-zero if package.json drifted from it. This is | ||||||||||||||||||||||||||||
| # what catches PRs that would otherwise silently rewrite the lockfile. | ||||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||||
| run: pnpm install --frozen-lockfile | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Format check | ||||||||||||||||||||||||||||
| run: pnpm format:check | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # --if-present skips silently for packages without a lint/build script. | ||||||||||||||||||||||||||||
| - name: Lint | ||||||||||||||||||||||||||||
| run: pnpm run --if-present lint | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Build | ||||||||||||||||||||||||||||
| run: pnpm run --if-present build | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| go: | ||||||||||||||||||||||||||||
| name: Go | ||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||
| defaults: | ||||||||||||||||||||||||||||
| run: | ||||||||||||||||||||||||||||
| working-directory: backend | ||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - uses: actions/setup-go@v5 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| go-version: "1.25" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: gofmt | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| out=$(gofmt -l .) | ||||||||||||||||||||||||||||
| if [ -n "$out" ]; then | ||||||||||||||||||||||||||||
| echo "Files need gofmt:" | ||||||||||||||||||||||||||||
| echo "$out" | ||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: go vet | ||||||||||||||||||||||||||||
| run: go vet ./... | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: go build | ||||||||||||||||||||||||||||
| run: go build ./... | ||||||||||||||||||||||||||||
|
Comment on lines
+85
to
+89
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win Go CI job runs no tests — The job only verifies formatting, vet, and that the binary compiles. Test regressions in 🧪 Proposed addition - name: go build
run: go build ./...
+
+ - name: go test
+ run: go test ./...📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Dependencies | ||
| node_modules/ | ||
|
|
||
| # Build outputs | ||
| .next/ | ||
| dist/ | ||
| build/ | ||
| out/ | ||
| .turbo/ | ||
| coverage/ | ||
|
|
||
| # Lockfiles (managed by package managers) | ||
| pnpm-lock.yaml | ||
| package-lock.json | ||
| yarn.lock | ||
|
|
||
| # Minified | ||
| *.min.js | ||
| *.min.css | ||
|
|
||
| # Non-JS/TS roots — formatted by their own tools (gofmt, ruff/black, etc.) | ||
| backend/ | ||
| dbSchema/drizzle/ | ||
| sdk/python/ | ||
| playground/main.py | ||
| playground/pyproject.toml | ||
| playground/merchant-fastapi/ | ||
| playground/merchant-jokes/ | ||
| playground/merchant_server/ | ||
| playground/e2e_test/ | ||
|
|
||
| # Python virtualenvs and cache anywhere in the tree | ||
| **/.venv/ | ||
| **/__pycache__/ | ||
| **/*.dist-info/ | ||
|
|
||
| # Generated / vendored | ||
| **/.next/** | ||
| **/dist/** | ||
|
|
||
| # Existing CI workflows (out of this PR's reformat scope; touch in a dedicated cleanup) | ||
| .github/workflows/deploy-sdks.yml | ||
| .github/workflows/publish-python-sdk.yml | ||
| .github/workflows/publish-ts-sdk.yml | ||
|
|
||
| # Working/plan docs not committed to the repo | ||
| CRITICAL_SECURITY_ISSUES.md | ||
| DOC_INCONSISTENCIES.md | ||
| H8_PART_A_PLAN.md | ||
| TOOLING_HYGIENE_PLAN.md |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "semi": true, | ||
| "singleQuote": false, | ||
| "printWidth": 100, | ||
| "trailingComma": "all", | ||
| "arrowParens": "always" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial | ⚡ Quick win
Go module cache will miss —
cache-dependency-pathneeds to point tobackend/go.sumactions/setup-go@v5is auses:step and is not subject todefaults.run.working-directory. It searches forgo.sumat the repository root;backend/go.sumis invisible to it. Every run will cache-miss and re-download modules.⚡ Proposed fix
- uses: actions/setup-go@v5 with: go-version: "1.25" + cache-dependency-path: backend/go.sum🤖 Prompt for AI Agents