version: "3" tasks: generate: cmds: - | cd backend && ent generate ./ent/schema \ --template=ent/schema/templates/has_id.tmpl - cd backend/app/api/ && swag fmt - cd backend/app/api/ && swag init --dir=./,../../internal,../../pkgs - | npx swagger-typescript-api \ --no-client \ --clean-output \ --modular \ --path ./backend/app/api/docs/swagger.json \ --output ./frontend/lib/api/types python3 ./scripts/process-types.py ./frontend/lib/api/types/data-contracts.ts api: cmds: - task: generate - cd backend && go run ./app/api/ {{.CLI_ARGS}} ./config.yml silent: false api:build: cmds: - cd backend && go build ./app/api/ silent: true api:test: cmds: - cd backend && go test ./app/api/ silent: true api:watch: cmds: - cd backend && gotestsum --watch ./... api:coverage: cmds: - cd backend && go test -race -coverprofile=coverage.out -covermode=atomic ./app/... ./internal/... ./pkgs/... -v -cover silent: true test:ci: cmds: - cd backend && go build ./app/api - backend/api & - sleep 5 - cd frontend && pnpm run test:ci silent: true frontend:watch: desc: Starts the vitest test runner in watch mode cmds: - cd frontend && pnpm vitest --watch frontend: desc: Run frontend development server cmds: - cd frontend && pnpm dev