-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
93 lines (77 loc) · 2.18 KB
/
Makefile.toml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
env_files = [
{ path = ".secrets.env", profile = "development" },
{ path = ".secrets.env", profile = "production" }
]
[env]
MONGO_URI="mongodb://localhost:27017"
REDIS_URI="redis://localhost:6379"
JWT_SECRET="secret"
APP_NAME="scrippt"
DOMAIN="localhost"
GOOGLE_CLIENT_ID="82324295624-32uqo7r4j24etafpr2t0ddqt5b0etmj8.apps.googleusercontent.com"
GOOGLE_JWK_PATH="./.jwk"
STANDARD_FONTS="/Users/santiagomedina/.cargo/git/checkouts/orca-6f55422cf8ee2a1b/c5323cc/assets/pdf_fonts"
[env.test]
ENV="test"
[env.ci]
ENV="test"
[env.development]
ENV="development"
RUST_LOG="debug"
[env.production]
ENV="production"
RUST_LOG="info"
[tasks.format-check]
description = "Format code using rustfmt"
command = "cargo"
args = ["fmt", "--all", "--", "--check"]
[tasks.lint]
description = "Lint code using clippy"
command = "cargo"
args = ["clippy"]
[tasks.docker]
description = "Run MongoDB and Redis for tests"
command = "docker"
args = ["compose", "-f", "docker-compose.dev.yml", "up", "-d"]
[tasks.docker-down]
description = "Stop MongoDB and Redis for tests"
command = "docker-compose"
args = ["-f", "docker-compose.dev.yml", "down"]
dependencies = ["docker"]
[tasks.test]
condition = { profiles = ["test", "ci"] }
description = "Run tests"
command = "cargo"
args = ["test"]
dependencies = ["docker"]
[tasks.test-unit]
condition = { profiles = ["test", "ci"] }
description = "Run unit tests"
command = "cargo"
args = ["test", "--lib"]
dependencies = ["docker"]
[tasks.test-account]
condition = { profiles = ["test", "ci"] }
description = "Run tests for account"
command = "cargo"
args = ["test", "--test", "test_account"]
dependencies = ["docker"]
[tasks.test-profile]
condition = { profiles = ["test", "ci"] }
description = "Run tests for profile"
command = "cargo"
args = ["test", "--test", "test_profile"]
dependencies = ["docker"]
[tasks.watch]
condition = { profiles = ["development"] }
description = "Run the server in watch mode"
command = "cargo"
args = ["watch", "-x", "run"]
[tasks.build]
condition = { profiles = ["production"] }
description = "Build the server"
command = "cargo"
args = ["build", "--release"]
[tasks.ci-flow]
description = "Run all CI tasks"
dependencies = ["format-check", "lint", "test"]