ЛР 2: завершить трек 2 на оценку 5
Lab2 application / application (pull_request) Canceled after 0s

This commit is contained in:
2026-10-28 15:41:38 +03:00
parent 834876c938
commit 9f0bb97b09
96 changed files with 109054 additions and 1959 deletions
+16 -1
View File
@@ -267,6 +267,17 @@ secrets:
results.append({"check": name, "status": "PASS", "seconds": round(time.monotonic() - started, 3),
**({"tests": detail} if detail else {})})
print("PASS: " + name, flush=True)
except subprocess.TimeoutExpired as error:
def decode(value):
return value.decode(errors="replace") if isinstance(value, bytes) else (value or "")
partial = decode(error.stdout) + decode(error.stderr)
partial = partial.replace(database, "<test-database-url>").replace(password, "<test-password>")
(output / (name + ".log")).write_text(partial)
results.append({"check": name, "status": "FAIL", "detail": "TimeoutExpired",
"seconds": round(time.monotonic() - started, 3), "runner_budget_seconds": timeout})
if required:
raise CheckFailure(name + " timed out; see partial sanitized log") from None
print("FAIL: " + name + "; partial log retained; continuing independent checks", flush=True)
except (OSError, subprocess.SubprocessError, CheckFailure) as error:
results.append({"check": name, "status": "FAIL", "detail": type(error).__name__})
if required:
@@ -279,7 +290,11 @@ secrets:
stage("lab2-harness", [sys.executable, "-m", "unittest", "discover", "-s", "student-tests/lab2", "-p", "test_harness.py", "-v"])
stage("compose-up", base + ["up", "-d", "--build", "--pull", pull, "--wait", "--wait-timeout", "90"], 300)
wait_ready(env["BASE_URL"])
stage("go-race", ["go", "test", "-race", "./...", "-count=1", "-json"], parse_go=True, timeout=300, required=False)
# Compile race-instrumented packages separately. Cold compilation is
# not an application-operation latency test and must not consume
# the execution budget of the actual integration tests.
stage("go-race-build", ["go", "test", "-race", "-run", "^$", "./..."], timeout=300)
stage("go-race", ["go", "test", "-race", "./...", "-count=1", "-json"], parse_go=True, timeout=600, required=False)
stage("go-build", ["go", "build", "./..."], required=False)
stage("go-vet", ["go", "vet", "./..."], required=False)
stage("teacher-smoke", ["make", "test", "BASE_URL=" + env["BASE_URL"], "PYTHON=" + Path(sys.executable).name], required=False)