-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yaml
39 lines (33 loc) · 853 Bytes
/
Taskfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: '3'
env:
PYTHONPATH: "{{.ROOT_DIR}}"
DJANGO_SETTINGS_MODULE: tests.settings
vars:
SQLITE_DB: "{{.ROOT_DIR}}/tests/db.sqlite3"
tasks:
manage:
desc: Run a Django management command
silent: true
cmds: ["django-admin {{.COMMAND}} {{.CLI_ARGS}}"]
env:
DJANGO_DATABASE_NAME: "{{.SQLITE_DB}}"
runserver:
desc: Migrate database schema and start Django's development web server
silent: true
deps:
- task: manage
vars: {COMMAND: migrate}
cmds:
- task: manage
vars: {COMMAND: runserver}
check-migrations:
desc: Check if there are any migration changes
silent: true
cmds:
- task: manage
vars: {COMMAND: makemigrations --check --dry-run}
reset-db:
desc: Remove the configured database
silent: true
cmds:
- rm -f {{.SQLITE_DB}}