Activate dev container deploy on push to develop
- .gitea/workflows/deploy-dev.yml: prepares the host (synthetic test vault, dev.env from the example on first run, never overwritten), then runs deploy/deploy.sh dev. Prod workflow stays an inactive template. - deploy/testvault: synthetic notes from scripts/make_test_vault.py plus synthetic edge_vocabulary.md/graph_schema.md (vault sentinel). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8f9f83aa79
commit
9d5b52a3c1
12 files changed
+237
-39
No files matched your search
@@ -244,8 +244,12 @@ def test_prod_env_example_blocks_cloud_egress():
|
||||
|
||||
# --- Gitea-Workflows und Deploy-Skript (Muster wie Kansho: develop -> dev, main -> prod) ----
|
||||
|
||||
WORKFLOWS = {"deploy-dev.yml": ROOT / ".gitea" / "workflows", # aktiv
|
||||
"deploy-prod.yml": DEPLOY / "gitea-workflows"} # Vorlage bis zur Umschaltung
|
||||
|
||||
|
||||
def _workflow(name):
|
||||
data = yaml.safe_load((DEPLOY / "gitea-workflows" / name).read_text(encoding="utf-8"))
|
||||
data = yaml.safe_load((WORKFLOWS[name] / name).read_text(encoding="utf-8"))
|
||||
return data, data.get("on", data.get(True)) # PyYAML liest den Schlüssel 'on' als True
|
||||
|
||||
|
||||
@@ -279,3 +283,18 @@ def test_deploy_script_checks_before_touching_running_stack():
|
||||
@pytest.mark.parametrize("envname", ["dev", "prod"])
|
||||
def test_compose_reads_env_file_from_host(envname):
|
||||
assert COMPOSE[envname]["x-hardening"]["env_file"] == [f"${{MINDNET_ENV_FILE:-env/{envname}.env}}"]
|
||||
|
||||
|
||||
def test_prod_workflow_not_active_before_switchover():
|
||||
assert not (ROOT / ".gitea" / "workflows" / "deploy-prod.yml").exists()
|
||||
|
||||
|
||||
def test_dev_testvault_is_synthetic_and_parseable():
|
||||
vault = DEPLOY / "testvault"
|
||||
vocab = (vault / "_system" / "dictionary" / "edge_vocabulary.md").read_text(encoding="utf-8")
|
||||
# Gleiches Muster wie app/services/edge_registry.py
|
||||
rows = re.findall(r"\|\s*\*\*`?([a-zA-Z0-9_-]+)`?\*\*\s*\|\s*`?([a-zA-Z0-9_-]+)`?\s*\|\s*([^|]+)\|", vocab)
|
||||
assert len(rows) >= 10
|
||||
assert (vault / "_system" / "dictionary" / "graph_schema.md").is_file()
|
||||
notes = [f for f in vault.rglob("*.md") if "_system" not in f.parts]
|
||||
assert notes and all("topic/test" in f.read_text(encoding="utf-8") for f in notes)
|
||||
Reference in new issue
Block a user