Skip to content

Commit 7ac3e43

Browse files
ambvclaude
andcommitted
Add ESLint and typecheck to CI, update docs
Replace the dummy CI workflow with one that runs ESLint and tsc on every push and PR. Document how to run both checks via Docker. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4ea96df commit 7ac3e43

File tree

3 files changed

+37
-7
lines changed

3 files changed

+37
-7
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
name: Dummy-CI
1+
name: CI
22

3-
on: [push]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
47

58
jobs:
6-
build:
9+
frontend-lint:
10+
name: Frontend Lint & Typecheck
711
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: frontend
815
steps:
9-
- uses: actions/checkout@v1
10-
- name: Pass
11-
run: echo Success!
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
cache: npm
21+
cache-dependency-path: frontend/package-lock.json
22+
- run: npm ci
23+
- run: npm run lint
24+
- run: npm run typecheck

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,17 @@ make dev-backend # Backend API on http://localhost:8000
4242

4343
### Testing
4444
```bash
45-
npm run lint # Frontend linting (in frontend directory)
45+
# Via Docker (recommended)
46+
docker compose -f docker-compose.dev.yml exec frontend npm run lint
47+
docker compose -f docker-compose.dev.yml exec frontend npm run typecheck
48+
49+
# Or locally in the frontend directory
50+
npm run lint # ESLint (must pass with zero errors)
4651
npm run typecheck # TypeScript type checking
4752
```
4853

54+
Both checks run in CI on every push and pull request.
55+
4956
### Database Management
5057
```bash
5158
make reset-db # Drop and recreate database with fresh data

docker-README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,16 @@ ADMIN_GITHUB_TEAMS=memory-python-org
130130

131131
**Note:** Development compose file uses port 9002 for frontend, production uses 3000.
132132

133+
### Linting & Type Checking
134+
135+
```bash
136+
# ESLint (must pass with zero errors)
137+
docker compose -f docker-compose.dev.yml exec frontend npm run lint
138+
139+
# TypeScript type checking
140+
docker compose -f docker-compose.dev.yml exec frontend npm run typecheck
141+
```
142+
133143
### Accessing the Database
134144

135145
```bash

0 commit comments

Comments
 (0)