forked from dlc-markets/pythia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.toml
More file actions
71 lines (59 loc) · 1.9 KB
/
Makefile.toml
File metadata and controls
71 lines (59 loc) · 1.9 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
65
66
67
68
69
70
71
[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
[tasks.default]
alias = "test"
# Docker
[tasks.docker-up]
description = "Launch Docker Compose"
dependencies = ["docker-down"]
command = "docker"
args = ["compose", "up", "--build", "-d"]
[tasks.docker-down]
description = "Stop Docker Compose"
command = "docker"
args = ["compose", "down"]
# Sqlx
[tasks.sqlx-prepare]
description = "Prepare sqlx database for tests"
command = "pnpm"
args = ["sqlx-prepare"]
[tasks.sqlx-prepare-dev]
description = "Prepare sqlx database for tests"
command = "pnpm"
args = ["sqlx-prepare-dev"]
# Test
[tasks.postgres-test-up]
description = "Launch PostgreSQL database with Docker Compose in detach mode"
dependencies = ["postgres-test-down"]
command = "docker"
args = ["compose", "-f", "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/compose.dev.yml", "up", "-d", "postgres-test"]
[tasks.postgres-test-down]
description = "Stop PostgreSQL database container"
command = "docker"
args = ["compose", "-f", "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/compose.dev.yml", "down", "postgres-test"]
[tasks.test]
description = "Run all regular tests (excluding ignored benchmarks)"
dependencies = ["sqlx-prepare-dev"]
command = "cargo"
args = ["test"]
[tasks.test-ws]
description = "Run Test WebSocket"
env = { "TEST_DATABASE_URL" = "postgres://postgres:postgres@127.0.0.1:5433/pythia_test" }
dependencies = ["sqlx-prepare-dev"]
command = "cargo"
args = ["test", "test_ws", "--", "--nocapture"]
[tasks.test-benchmark]
description = "Run only benchmark tests (which are marked as ignored)"
dependencies = ["sqlx-prepare-dev"]
command = "cargo"
args = ["test", "--", "--ignored", "--nocapture"]
[tasks.test-all]
description = "Run all tests including benchmarks"
dependencies = ["sqlx-prepare-dev"]
command = "cargo"
args = ["test", "--", "--include-ignored"]
# Cleaning
[tasks.clean]
description = "Remove artifacts in target directory"
command = "cargo"
args = ["clean"]