mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-03 06:48:18 +00:00
Run CLI database continuity regression in standard CI
This commit is contained in:
1 parent
3364e04141
commit
d2b55c7f49
6 files changed
+185
-26
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { test } from "node:test";
|
||||
|
||||
test("fetch database continuity is exercised by standard CLI CI", async () => {
|
||||
const ciTasks = JSON.parse(await readFile(new URL("./ci-tasks.json", import.meta.url), "utf8")) as string[];
|
||||
const tasks = JSON.parse(await readFile(new URL("./tasks.json", import.meta.url), "utf8")) as Record<
|
||||
string,
|
||||
{ test?: string[] }
|
||||
>;
|
||||
const workflow = await readFile(new URL("../../.github/workflows/cli-node-tests.yml", import.meta.url), "utf8");
|
||||
|
||||
assert(ciTasks.includes("test:helpers"), "the standard CI suite must run the task registration contract");
|
||||
assert(tasks["test:helpers"]?.test?.includes("test-ci-task-contract.ts"));
|
||||
assert(ciTasks.includes("test:fetch-database-continuity"), "the continuity task must be in the standard CI suite");
|
||||
assert.deepEqual(tasks["test:fetch-database-continuity"]?.test, ["test-fetch-database-continuity.ts"]);
|
||||
assert.match(workflow, /test\/e2e-cli\/ci-tasks\.json/, "the automatic CI matrix must read the authoritative task list");
|
||||
});
|
||||
Reference in new issue
Block a user