116 lines
2.5 KiB
YAML
116 lines
2.5 KiB
YAML
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
|
version: '3'
|
|
|
|
vars:
|
|
DEV_COMPOSE: docker compose -f compose.yaml -f compose.dev.yaml
|
|
|
|
tasks:
|
|
default:
|
|
desc: List available commands
|
|
silent: true
|
|
cmds:
|
|
- task --list
|
|
|
|
dev:
|
|
desc: Start both services with hot reload
|
|
summary: |
|
|
Build and start the API and frontend with Compose Watch.
|
|
Frontend: http://localhost:5173; API: http://localhost:8080.
|
|
Ctrl+C stops the services. Run task dev:down to remove containers.
|
|
Override occupied ports with API_PORT=18080 DEV_WEB_PORT=15173 task dev.
|
|
Requires Docker Compose 2.32+; native Go, Node and pnpm are unnecessary.
|
|
cmds:
|
|
- '{{.DEV_COMPOSE}} up --build --watch'
|
|
|
|
dev:down:
|
|
desc: Stop and remove development containers
|
|
cmds:
|
|
- '{{.DEV_COMPOSE}} down'
|
|
|
|
dev:logs:
|
|
desc: Follow development service logs
|
|
cmds:
|
|
- '{{.DEV_COMPOSE}} logs --follow --tail 100'
|
|
|
|
dev:status:
|
|
desc: Show development service status
|
|
cmds:
|
|
- '{{.DEV_COMPOSE}} ps'
|
|
|
|
install:
|
|
desc: Download native backend and frontend dependencies
|
|
cmds:
|
|
- task: backend:install
|
|
- task: frontend:install
|
|
|
|
check:
|
|
desc: Check Go code, frontend linting and TypeScript types
|
|
cmds:
|
|
- task: backend:check
|
|
- task: frontend:check
|
|
|
|
test:
|
|
desc: Run backend race tests and frontend component tests
|
|
cmds:
|
|
- task: backend:test
|
|
- task: frontend:test
|
|
|
|
build:
|
|
desc: Build both production Docker images
|
|
cmds:
|
|
- docker compose build
|
|
|
|
format:
|
|
desc: Format Go code and apply safe Biome fixes
|
|
cmds:
|
|
- task: backend:format
|
|
- task: frontend:format
|
|
|
|
backend:install:
|
|
desc: Download Go modules
|
|
dir: backend
|
|
cmds:
|
|
- go mod download
|
|
|
|
backend:check:
|
|
desc: Run Go vet
|
|
dir: backend
|
|
cmds:
|
|
- go vet ./...
|
|
|
|
backend:test:
|
|
desc: Run Go tests with race detection
|
|
dir: backend
|
|
cmds:
|
|
- go test -race ./...
|
|
|
|
backend:format:
|
|
desc: Format backend Go source
|
|
dir: backend
|
|
cmds:
|
|
- go fmt ./...
|
|
|
|
frontend:install:
|
|
desc: Install frontend dependencies from the lockfile
|
|
dir: frontend
|
|
cmds:
|
|
- pnpm install --frozen-lockfile
|
|
|
|
frontend:check:
|
|
desc: Run Biome and TypeScript checks
|
|
dir: frontend
|
|
cmds:
|
|
- pnpm check
|
|
|
|
frontend:test:
|
|
desc: Run Vitest component tests
|
|
dir: frontend
|
|
cmds:
|
|
- pnpm test
|
|
|
|
frontend:format:
|
|
desc: Apply Biome formatting and safe fixes
|
|
dir: frontend
|
|
cmds:
|
|
- pnpm format
|