ci: add pull request quality gates
CI / install-and-build (pull_request) Successful in 1m29s
CI / format (pull_request) Successful in 51s
CI / typecheck-source (pull_request) Successful in 41s
CI / typecheck-tests (pull_request) Successful in 39s
CI / test (pull_request) Successful in 51s
CI / lint (pull_request) Successful in 21s

Co-Authored-By: gpt-5.6-terra <noreply@openai.com>
This commit was merged in pull request #12.
This commit is contained in:
2026-07-22 21:50:29 +00:00
co-authored by Codex
parent b9fa79ff1f
commit 31d4636dde
80 changed files with 2007 additions and 398 deletions
+15 -7
View File
@@ -11,7 +11,10 @@ import { hashPassword } from "../../src/util/hash.js";
export function runAuthTests(
name: string,
getDb: () => Promise<{ db: BackendDbInterface; close(): void }>,
createExpiredApikey?: (db: BackendDbInterface, uid: string) => Promise<`at_${string}`>
createExpiredApikey?: (
db: BackendDbInterface,
uid: string,
) => Promise<`at_${string}`>,
): void {
describe(`${name}: auth`, async () => {
let db: BackendDbInterface;
@@ -23,7 +26,12 @@ export function runAuthTests(
({ db, close } = await getDb());
email = `auth-user-${Date.now()}@test.example`;
const pw = await hashPassword(password);
await db.createUser({ email, name: "Auth User", password: pw, flags: {} });
await db.createUser({
email,
name: "Auth User",
password: pw,
flags: {},
});
});
after(() => close());
@@ -40,7 +48,7 @@ export function runAuthTests(
(err) => {
assert.ok(err instanceof NotAuthorizedAbodeError);
return true;
}
},
);
});
@@ -54,7 +62,7 @@ export function runAuthTests(
(err) => {
assert.ok(err instanceof NotFoundAbodeError);
return true;
}
},
);
});
@@ -71,7 +79,7 @@ export function runAuthTests(
(err) => {
assert.ok(err instanceof ConflictAbodeError);
return true;
}
},
);
});
});
@@ -118,7 +126,7 @@ export function runAuthTests(
(err) => {
assert.ok(err instanceof NotAuthorizedAbodeError);
return true;
}
},
);
});
@@ -129,7 +137,7 @@ export function runAuthTests(
(err) => {
assert.ok(err instanceof NotFoundAbodeError);
return true;
}
},
);
});
});