Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,15 @@ jobs:
go-version: "1.23"
- name: Run the Go gate
run: make go-check

js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install deps
run: make js-setup
- name: Run the TS gate
run: make js-check
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
PKG := packages/python
VBIN := $(PKG)/.venv/bin
GODIR := packages/go
JSDIR := packages/js

# Prefer the project venv's tools. abspath keeps the path valid after `cd $(PKG)`.
PY := $(if $(wildcard $(VBIN)/python),$(abspath $(VBIN)/python),python3)
Expand All @@ -17,7 +18,7 @@ PYTEST := $(if $(wildcard $(VBIN)/pytest),$(abspath $(VBIN)/pytest),pytest)
GO := go

.DEFAULT_GOAL := help
.PHONY: help setup lint types test conformance check demo clean go-lint go-test go-check
.PHONY: help setup lint types test conformance check demo clean go-lint go-test go-check js-setup js-check

help:
@echo "Reins — make targets:"
Expand All @@ -29,6 +30,7 @@ help:
@echo " check lint + types + test + conformance <- the Python gate"
@echo " demo run the flagship example end-to-end"
@echo " go-check gofmt + go vet + go test <- the Go gate (Phase 6)"
@echo " js-check prettier + tsc --noEmit + vitest <- the TS gate (Phase 7)"
@echo " clean remove the local venv and caches"

setup:
Expand Down Expand Up @@ -78,6 +80,17 @@ go-test:
go-check: go-lint go-test
@echo ">> go-check: all green"

# The TypeScript port (Phase 7). Like go-check, a separate gate with its own CI job
# so the Python and Go jobs need no Node toolchain. `js-setup` installs deps.
js-setup:
cd $(JSDIR) && npm install

js-check:
cd $(JSDIR) && npm run format:check
cd $(JSDIR) && npm run typecheck
cd $(JSDIR) && npm test
@echo ">> js-check: all green"

# The flagship example: a deterministic end-to-end walkthrough (FakeModel, no key).
demo:
$(PY) -m examples.fastapi_sqlalchemy.demo
Expand Down
4 changes: 4 additions & 0 deletions packages/js/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
dist/
coverage/
*.tsbuildinfo
6 changes: 6 additions & 0 deletions packages/js/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 100,
"singleQuote": true,
"semi": true,
"trailingComma": "all"
}
Loading
Loading