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
Marc Cataford d3cc915039
build(backend): test tooling setup + taskfile tidy (#7)
* build(backend): test tooling setup + taskfile tidy

* test(backend): add stub test

* ci: run backend tests
2023-08-11 13:58:22 -04:00

48 lines
1.3 KiB
YAML

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: source {{ .VENV_ACTIVATE }} && pytest .
dir: backend
start:
desc: "Starts the backend application."
deps: [bootstrap]
dotenv:
- "../.env"
cmd: source {{ .VENV_ACTIVATE }} && python -m uvicorn main:app
dir: backend/rotini
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