fix(ci): run api root lint/typecheck/test scripts; remove dead servicesTable (GRO-2197)
The api gate ran `pnpm --filter @groombook/api <script>`, but @groombook/api is the workspace ROOT package and pnpm-workspace.yaml only includes packages/*, so --filter excluded the root and the lint/typecheck/test steps silently no-op'd (false-green). Invoke the root scripts directly instead. Now that the gate actually runs eslint, fix the latent unused-var error in src/__tests__/petProfileSummary.test.ts: servicesTable was declared and assigned in resetMock but never enqueued/read. Remove the declaration, the dead write, and the now-orphaned makeService helper (its only caller). Verified locally: pnpm run typecheck, pnpm --filter @groombook/db typecheck, pnpm run lint (0 errors), pnpm run test (602 passed) all green. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -33,11 +33,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
run: |
|
run: |
|
||||||
pnpm --filter @groombook/api typecheck
|
pnpm run typecheck
|
||||||
pnpm --filter @groombook/db typecheck
|
pnpm --filter @groombook/db typecheck
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: pnpm --filter @groombook/api lint
|
run: pnpm run lint
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pnpm --filter @groombook/api test
|
run: pnpm run test
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
name: Build & Push Docker Images
|
name: Build & Push Docker Images
|
||||||
|
|||||||
@@ -131,20 +131,6 @@ function makeAppointment(overrides: Record<string, unknown> = {}) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeService(overrides: Record<string, unknown> = {}) {
|
|
||||||
return {
|
|
||||||
id: "service-1",
|
|
||||||
name: "Full Groom",
|
|
||||||
description: null,
|
|
||||||
basePriceCents: 6000,
|
|
||||||
durationMinutes: 120,
|
|
||||||
active: true,
|
|
||||||
createdAt: new Date(),
|
|
||||||
updatedAt: new Date(),
|
|
||||||
...overrides,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function makeSession(overrides: Record<string, unknown> = {}) {
|
function makeSession(overrides: Record<string, unknown> = {}) {
|
||||||
return {
|
return {
|
||||||
id: "sess-owner",
|
id: "sess-owner",
|
||||||
@@ -164,7 +150,6 @@ function makeSession(overrides: Record<string, unknown> = {}) {
|
|||||||
|
|
||||||
let petsTable: Record<string, unknown>[];
|
let petsTable: Record<string, unknown>[];
|
||||||
let appointmentsTable: Record<string, unknown>[];
|
let appointmentsTable: Record<string, unknown>[];
|
||||||
let servicesTable: Record<string, unknown>[];
|
|
||||||
let sessionsTable: Record<string, unknown>[];
|
let sessionsTable: Record<string, unknown>[];
|
||||||
|
|
||||||
// selectQueue: queries resolve in FIFO order. Each .from(table) result
|
// selectQueue: queries resolve in FIFO order. Each .from(table) result
|
||||||
@@ -198,7 +183,6 @@ function enqueueThrow(table: string, message: string) {
|
|||||||
function resetMock() {
|
function resetMock() {
|
||||||
petsTable = [makePet()];
|
petsTable = [makePet()];
|
||||||
appointmentsTable = [makeAppointment()];
|
appointmentsTable = [makeAppointment()];
|
||||||
servicesTable = [makeService()];
|
|
||||||
sessionsTable = [makeSession()];
|
sessionsTable = [makeSession()];
|
||||||
selectQueue = [];
|
selectQueue = [];
|
||||||
insertCapture = [];
|
insertCapture = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user