-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
75 lines (58 loc) · 1.82 KB
/
Copy pathTaskfile.yml
File metadata and controls
75 lines (58 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '3'
vars:
BACKEND_DIR: backend
tasks:
default:
cmd: task --list
dev:
desc: Start full stack via Docker Compose
cmd: docker compose up -d
dev:frontend:
desc: Start Next.js dev server
cmd: npm run dev
dev:backend:
desc: Start Go server with live reload
cmd: cd {{.BACKEND_DIR}} && go run ./cmd/server
test:
desc: Run all tests
deps: [test:frontend, test:backend]
test:frontend:
desc: Run Vitest unit tests
cmd: npm run test
test:backend:
desc: Run Go tests with race detector
cmd: cd {{.BACKEND_DIR}} && go test -race -coverprofile=coverage.out -covermode=atomic ./...
lint:
desc: Lint frontend and backend
deps: [lint:frontend, lint:backend]
lint:frontend:
desc: ESLint + TypeScript type check
cmds:
- npm run lint
- npx tsc --noEmit
lint:backend:
desc: go vet + golangci-lint
cmds:
- cd {{.BACKEND_DIR}} && go vet ./...
- cd {{.BACKEND_DIR}} && golangci-lint run ./... --timeout=5m
build:frontend:
desc: Build Next.js production bundle
cmd: npm run build
build:backend:
desc: Build Go server binary
cmd: cd {{.BACKEND_DIR}} && go build -o dist/server ./cmd/server
format:
desc: Format all code
cmds:
- npm run format
- cd {{.BACKEND_DIR}} && gofmt -w .
migrate:up:
desc: Run database migrations up
cmd: cd {{.BACKEND_DIR}} && go run -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate -path migrations -database "${DATABASE_URL}" up
migrate:down:
desc: Rollback last migration
cmd: cd {{.BACKEND_DIR}} && go run -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate -path migrations -database "${DATABASE_URL}" down 1
clean:
desc: Remove build artifacts
cmds:
- rm -rf .next/ backend/dist/ backend/coverage.out