This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
rotini/Taskfile.backend.yml

55 lines
1.4 KiB
YAML
Raw Normal View History

version: '3'
env:
VENV_ACTIVATE: "/{{ .TASKFILE_DIR }}/backend/.venv/bin/activate"
tasks:
bootstrap:
internal: true
cmds:
- . script/bootstrap
dir: backend
lint:
desc: "Lints /backend using black + pylint."
deps: [bootstrap]
cmd: source {{ .VENV_ACTIVATE }} && black . --check && pylint ./rotini
dir: backend
lintfix:
desc: "Lints and fixes /backend using black + pylint."
deps: [bootstrap]
cmd: source {{ .VENV_ACTIVATE }} && black . && pylint ./rotini
dir: backend
test:
desc: "Run the test suites."
deps: [bootstrap]
cmd: . script/test
dir: backend
start:
desc: "Starts the backend application."
deps: [bootstrap]
dotenv:
- "../.env"
cmd: source {{ .VENV_ACTIVATE }} && python -m uvicorn main:app
dir: backend/rotini
start-db:
desc: "Provisions a local Postgres database."
dotenv:
- ".env"
cmd: . script/provision-db
dir: backend
migrate:
desc: "Applies migrations. Usage: be:migrate -- <up|down>"
deps: [bootstrap]
dotenv:
- "../../.env"
cmds:
- source {{ .VENV_ACTIVATE }} && python migrate.py {{.CLI_ARGS}}
dir: backend/rotini/migrations
lock-deps:
desc: "Locks production and development dependencies"
deps: [bootstrap]
cmds:
- source {{ .VENV_ACTIVATE }} && . script/requirements-lock
dir: backend