homebox/Taskfile.yml

51 lines
1.1 KiB
YAML
Raw Normal View History

2022-08-30 02:30:36 +00:00
version: "3"
tasks:
api:
cmds:
- cd backend/app/api/ && swag fmt
2022-08-30 18:05:31 +00:00
- cd backend/app/api/ && swag init --dir=./,../../internal,../../pkgs,../../ent
2022-08-30 02:30:36 +00:00
# - |
# npx swagger-typescript-api \
# --path ./backend/app/api/docs/swagger.json \
# --output ./client/auto-client \
# --module-name-first-tag \
# --modular
- cd backend && go run ./app/api/ {{.CLI_ARGS}}
silent: false
sources:
- ./backend/**/*.go
api:build:
cmds:
- cd backend && go build ./app/api/
silent: true
api:test:
cmds:
- cd backend && go test ./app/api/
silent: true
api:coverage:
cmds:
- cd backend && go test -race -coverprofile=coverage.out -covermode=atomic ./app/... ./internal/... ./pkgs/... -v -cover
silent: true
2022-09-09 19:34:19 +00:00
test:ci:
2022-08-30 02:30:36 +00:00
cmds:
- cd backend && go build ./app/api
- backend/api &
2022-08-30 02:30:36 +00:00
- sleep 5
2022-09-04 02:42:03 +00:00
- cd frontend && pnpm run test:ci
2022-08-30 02:30:36 +00:00
silent: true
docker:build:
cmds:
- cd backend && docker-compose up --build
silent: true
generate:types:
cmds:
- cd backend && go run ./app/generator
silent: true