Repository navigation
Expand file tree
/
Copy pathtaskfile.yml
More file actions
64 lines (54 loc) · 1.36 KB
/
Copy pathtaskfile.yml
File metadata and controls
64 lines (54 loc) · 1.36 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version: "3"
tasks:
db:up:
desc: Start the local Postgres and apply the schema
cmds:
- docker compose up -d --wait db
- task: schema:apply
db:down:
desc: Stop the local Postgres
cmds:
- docker compose down
schema:plan:
desc: Write the pending changes to the next file in db/migrations
dir: apps/api
cmds:
- uv run hackproof schema plan
schema:apply:
desc: Apply the schema files to the local database
dir: apps/api
cmds:
- uv run hackproof schema apply
schema:verify:
desc: Check the database matches the schema files
dir: apps/api
cmds:
- uv run hackproof schema verify
sql:fmt:
desc: Format the schema and query files
dir: apps/api
cmds:
- uv run sqlfluff fix db/schema src/hackproof/sql
sql:lint:
desc: Lint the schema and query files
dir: apps/api
cmds:
- uv run sqlfluff lint db/schema src/hackproof/sql
py:fmt:
desc: Format the Python code
dir: apps/api
cmds:
- uv run ruff check --fix .
- uv run ruff format .
py:check:
desc: Lint and test the Python code
dir: apps/api
cmds:
- uv run ruff check .
- uv run ruff format --check .
- uv run pytest
data:check:
desc: Check the database matches the committed data files
dir: apps/api
cmds:
- uv run hackproof check