-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.mise.toml
140 lines (121 loc) · 3.28 KB
/
.mise.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# https://mise.jdx.dev
[tools]
"aqua:nats-io/natscli" = "0.1"
helm = "3"
helmfile = "0.170"
istioctl = "1.24"
kind = "0.26"
kubectl = "1.32"
poetry = "2.0"
pre-commit = "4.1"
python = "3.12"
tilt = "0.33"
usage = "latest"
[settings]
experimental = true
# Prevent Mise from running multiple jobs at the same time.
# Prevents `poetry install` from running in parallel which
# results in multiple threads trying to write to the same file.
jobs = 1
# Install precompiled python binary
python_compile = false
[env]
DOCKER_HOST_OVERRIDE = "unix:///var/run/docker.sock"
KIND_CLUSTER_NAME = "acapy-cloud"
KIND_K8S_CONTEXT = "kind-{{env.KIND_CLUSTER_NAME}}"
KIND_DOCKER_CACHE = "docker-cache"
KIND_DOCKER_REGISTRY = "docker-registry"
KIND_DOCKER_REGISTRY_PORT = "5001"
# Use Python/Mise managed virtual environment
POETRY_VIRTUALENVS_CREATE = "false"
# Setup Python Virtual Environment
_.python.venv = { path = ".venv", create = true }
[tasks."poetry:install"]
description = "Poetry Install dependencies for all submodules"
depends = ["poetry:install:*"]
[tasks."poetry:update"]
description = "Poetry Update lockfiles for all submodules"
depends = ["poetry:update:*"]
[tasks."tilt:up"]
description = "Start Tilt"
depends = ["kind:create"]
run = "tilt up"
[tasks."tilt:up:podman"]
description = "Start Tilt with Podman"
depends = ["kind:create"]
run = """
#!/bin/bash
mise set DOCKER_HOST=${DOCKER_HOST_OVERRIDE}
tilt up
"""
[tasks."tilt:up:expose"]
description = "Start Tilt with `--expose` flag"
depends = ["kind:create"]
run = "tilt up -- --expose"
[tasks."tilt:down"]
description = "Tilt Down"
run = "tilt down"
[tasks."tilt:down:destroy"]
description = "Tilt Down Destroy"
run = "tilt down -- --destroy"
[tasks."tilt:down:destroy:all"]
description = "Tilt Down Destroy everything, including Docker Cache"
run = "tilt down -- --destroy-all"
[tasks."tilt:ci"]
description = "Start Tilt in CI mode"
depends = ["kind:create"]
run = "tilt ci -- --no-build"
[tasks."kind:destroy:all"]
description = "Destroy Kind and delete Docker Registry & Cache"
run = """
#!/bin/bash
mise run kind:destroy --destroy-registry-containers
rm -rf tilt/docker
"""
[tasks.tests]
description = "Run all tests"
depends = ["poetry:install"]
run = """
#!/bin/bash
cp .env.example .env
source .env
poetry run pytest . --ignore ./tilt $@
"""
[tasks."tests:unit"]
description = "Run unit tests"
depends = ["poetry:install"]
run = "poetry run pytest -n auto --dist loadgroup -o 'norecursedirs=e2e' $@"
[tasks."tests:e2e"]
description = "Run e2e tests"
depends = ["poetry:install"]
run = """
#!/bin/bash
cp .env.example .env
source .env
poetry run pytest -n auto --dist loadgroup $(find . -type d -path '*/tests/e2e' -not -path './tilt*')$@
"""
[tasks.fmt]
description = "Format files"
run = """
#!/bin/bash
isort . --profile black
black .
find . -type f -name "Tiltfile" | while read -r file; do
black "$file"
done
"""
[tasks."fmt:check"]
description = "Check all files for formatting"
run = """
#!/bin/bash
isort . --check --profile black --diff
black . --check --diff
find . -type f -name "Tiltfile" | while read -r file; do
black --check --diff "$file"
done
"""
[tasks."bootstrap:kubeconfig"]
description = "Set KUBECONFIG"
run = "mise set --env local --file mise.local.toml KUBECONFIG=$(pwd)/.mise/kubeconfig.yaml"
[hooks]
enter = ["mise bootstrap:kubeconfig"]