fix(ci): retain supervised gate logs and receipts

This commit is contained in:
diegosouzapw
2026-09-21 19:18:12 -03:00
parent d0542dee44
commit 0e6b8dcd14
2 changed files with 26 additions and 0 deletions

View File

@@ -247,7 +247,9 @@ jobs:
path: |
release-green.json
release-green.log
_artifacts/release-green/
if-no-files-found: error
retention-days: 14
- name: Enforce validation verdict
if: always()
@@ -388,7 +390,9 @@ jobs:
path: |
main-green.json
main-green.log
_artifacts/release-green/
if-no-files-found: error
retention-days: 14
- name: Enforce validation verdict
if: always()

View File

@@ -0,0 +1,22 @@
import test from "node:test";
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { parse } from "yaml";
test("both observers retain incremental command logs even on failure", () => {
const workflow = parse(
readFileSync(
new URL("../../../.github/workflows/nightly-release-green.yml", import.meta.url),
"utf8"
)
);
for (const id of ["release-green", "main-green"]) {
const upload = workflow.jobs[id].steps.find(
(step: { name?: string }) => step.name === "Upload report artifact"
);
assert.equal(upload.if, "always()");
assert.match(upload.with.path, /_artifacts\/release-green\//);
assert.equal(upload.with["if-no-files-found"], "error");
assert.equal(upload.with["retention-days"], 14);
}
});