Skip to content

Commit 6e6c733

Browse files
committed
Add tasks for starting and stopping Postgres containers
1 parent 1cb965e commit 6e6c733

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

mise.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
# "./tests/mise.tls.toml",
88
# ]
99
[task_config]
10-
includes = ["tasks"]
11-
10+
includes = [
11+
"tasks",
12+
"tasks/postgres.toml"
13+
]
1214

1315
[env]
1416
# Default configuration for running cipherstash-proxy out of the box

tasks/postgres.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
["postgres:down"]
2+
description = "Tear down Postgres containers"
3+
dir = "{{config_root}}/tests"
4+
run = "docker compose down"
5+
6+
["postgres:up"]
7+
description = "Run Postgres instances with docker compose"
8+
dir = "{{config_root}}/tests"
9+
run = """
10+
{% set default_service = "postgres-" ~ get_env(name="POSTGRES_VERSION",default="17") %}
11+
echo docker compose up {{arg(name="service",default=default_service)}} {{option(name="extra-args",default="")}} | bash
12+
"""

0 commit comments

Comments
 (0)