All checks were successful
Mostovik Backend CI/CD / Tests and lint (push) Successful in 3m28s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Successful in 3m23s
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Successful in 1m49s
27 lines
910 B
Python
27 lines
910 B
Python
from pathlib import Path
|
|
|
|
import yaml
|
|
|
|
WORKFLOWS = Path(__file__).resolve().parents[1] / ".gitea" / "workflows"
|
|
|
|
|
|
def test_workflows_do_not_deploy_to_center():
|
|
assert not (WORKFLOWS / "deploy-customer-main.yml").exists()
|
|
for path in WORKFLOWS.glob("*.y*ml"):
|
|
workflow = yaml.safe_load(path.read_text())
|
|
assert "deploy_customer_main" not in workflow["jobs"]
|
|
content = path.read_text()
|
|
for forbidden in ("CUSTOMER_DEPLOY_", "10.0.10.174", "/ecos/release-service"):
|
|
assert forbidden not in content, (path.name, forbidden)
|
|
|
|
|
|
def test_ci_does_not_prune_shared_runner_resources():
|
|
for path in WORKFLOWS.glob("*.y*ml"):
|
|
content = path.read_text()
|
|
for command in (
|
|
"docker system prune",
|
|
"docker builder prune",
|
|
"docker buildx prune",
|
|
):
|
|
assert command not in content, (path.name, command)
|