-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmise.toml
More file actions
56 lines (43 loc) · 1.89 KB
/
Copy pathmise.toml
File metadata and controls
56 lines (43 loc) · 1.89 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
[tools]
crystal = "1.20.2"
[vars]
# Add --verbose only in an interactive terminal (TTY check)
SPEC_OPTS = "{% if exec(command='(tty -s && echo true) || echo false') == 'true' %}--verbose{% endif %}"
[tasks."dev:deps"]
description = "Install dependencies (also builds bin/ameba)"
run = "shards install"
[tasks."dev:format"]
description = "Format the source"
run = "crystal tool format src/ spec/"
[tasks."dev:format-check"]
description = "Check formatting"
run = "crystal tool format --check"
[tasks."dev:ameba"]
description = "Run static code analysis"
run = "bin/ameba"
[tasks."dev:spec"]
description = "Run the spec suite"
run = "crystal spec --error-trace {{vars.SPEC_OPTS}}"
[tasks."dev:spec-mt"]
description = "Run the spec suite multi-threaded (fiber-safety gate)"
run = "crystal spec --error-trace -Dpreview_mt {{vars.SPEC_OPTS}}"
env = { CRYSTAL_WORKERS = "4" }
[tasks."dev:docs"]
description = "Build the API docs (fails on doc-comment / compile errors)"
run = "crystal docs"
[tasks."dev:check"]
description = "Format-check, lint and test in one shot"
run = "mise dev:format-check && mise dev:ameba && mise dev:spec && mise dev:spec-mt"
[tasks."dev:ldap-up"]
description = "Start the integration OpenLDAP server (docker compose)"
run = "docker compose up -d --wait"
[tasks."dev:ldap-down"]
description = "Stop and wipe the integration OpenLDAP server"
run = "docker compose down -v"
[tasks."dev:spec-integration"]
description = "Run the integration suite against the live LDAP server (needs dev:ldap-up)"
run = "crystal spec --error-trace -Dintegration {{vars.SPEC_OPTS}}"
# TODO: remove me when https://github.com/crystal-lang/crystal/issues/16746 is fixed
[tasks."dev:fix-shards-command"]
description = "Fix missing shards command on macOS"
run = "cp $HOME/.local/share/mise/installs/crystal/{{tools.crystal.version}}/embedded/bin/shards $HOME/.local/share/mise/installs/crystal/{{tools.crystal.version}}/bin/"