ci: run lint and test jobs in parallel #165
ci.yml
on: pull_request
Lint & Typecheck
19s
Test
56s
Docker Build
Annotations
12 errors and 12 warnings
|
Lint & Typecheck
Process completed with exit code 1.
|
|
Lint & Typecheck:
src/cache/warmer.ts#L20
'totalPages' is never reassigned. Use 'const' instead
|
|
tests/unit/services/concurrent-safety.test.ts > Concurrent Request Safety > Quiz Submission > should prevent duplicate submission via distributed lock:
src/audit/index.ts#L31
TypeError: db.insert(...).values(...).catch is not a function
❯ auditLog src/audit/index.ts:31:50
❯ src/modules/quizzes/quiz.service.ts:284:9
|
|
tests/unit/services/concurrent-safety.test.ts > Concurrent Request Safety > Course Enrollment > should prevent duplicate enrollment via distributed lock:
tests/unit/services/concurrent-safety.test.ts#L334
AssertionError: promise rejected "Error: [vitest] No "cacheKeyPattern" expo… { codeFrame: '…' }" instead of resolving
❯ tests/unit/services/concurrent-safety.test.ts:334:7
Caused by: Caused by: Error: [vitest] No "cacheKeyPattern" export is defined on the "../../../src/cache/index.js" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock(import("../../../src/cache/index.js"), async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ src/modules/courses/course.service.ts:223:36
|
|
tests/unit/services/concurrent-safety.test.ts > Concurrent Request Safety > Credential Minting > should prevent duplicate mint via distributed lock:
src/audit/index.ts#L31
TypeError: db.insert(...).values(...).catch is not a function
❯ auditLog src/audit/index.ts:31:50
❯ src/modules/credentials/credential.service.ts:170:7
|
|
tests/unit/services/concurrent-safety.test.ts > Concurrent Request Safety > Reward Claiming > should prevent double-claim via distributed lock:
src/audit/index.ts#L31
TypeError: Cannot read properties of undefined (reading 'values')
❯ auditLog src/audit/index.ts:31:22
❯ src/modules/rewards/reward.service.ts:400:7
|
|
tests/unit/middleware/error-handler.test.ts > Error Handler Middleware > should handle generic Error:
src/middleware/error-handler.ts#L71
TypeError: app.setNotFoundHandler is not a function
❯ Module.registerErrorHandler src/middleware/error-handler.ts:71:7
❯ tests/unit/middleware/error-handler.test.ts:26:5
|
|
tests/unit/middleware/error-handler.test.ts > Error Handler Middleware > should handle AppError:
src/middleware/error-handler.ts#L71
TypeError: app.setNotFoundHandler is not a function
❯ Module.registerErrorHandler src/middleware/error-handler.ts:71:7
❯ tests/unit/middleware/error-handler.test.ts:26:5
|
|
tests/unit/middleware/error-handler.test.ts > Error Handler Middleware > should handle ZodError:
src/middleware/error-handler.ts#L71
TypeError: app.setNotFoundHandler is not a function
❯ Module.registerErrorHandler src/middleware/error-handler.ts:71:7
❯ tests/unit/middleware/error-handler.test.ts:26:5
|
|
tests/unit/middleware/error-handler.test.ts > Error Handler Middleware > should register error handler:
src/middleware/error-handler.ts#L71
TypeError: app.setNotFoundHandler is not a function
❯ Module.registerErrorHandler src/middleware/error-handler.ts:71:7
❯ tests/unit/middleware/error-handler.test.ts:26:5
|
|
tests/unit/tracing.test.ts:
tests/unit/tracing.test.ts#L32
Error: Cannot find module '../../../src/tracing.js' imported from '/home/runner/work/chainlearn-api/chainlearn-api/tests/unit/tracing.test.ts'
❯ tests/unit/tracing.test.ts:32:1
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'ERR_MODULE_NOT_FOUND' }
Caused by: Caused by: Error: Failed to load url ../../../src/tracing.js (resolved id: ../../../src/tracing.js) in /home/runner/work/chainlearn-api/chainlearn-api/tests/unit/tracing.test.ts. Does the file exist?
❯ loadAndTransform node_modules/vite/dist/node/chunks/config.js:22739:33
|
|
src/test/quiz-grading-and-warming.test.ts > Quiz grading edge cases & cache warming (#143, #144, #145, #147) > an answer with an unrecognized questionId is skipped and logged, not silently ignored (#144):
src/config/stellar.ts#L23
Error: invalid encoded string
❯ decodeCheck node_modules/@stellar/stellar-base/lib/strkey.js:354:11
❯ Function.decodeEd25519SecretSeed node_modules/@stellar/stellar-base/lib/strkey.js:110:14
❯ Function.fromSecret node_modules/@stellar/stellar-base/lib/keypair.js:245:38
❯ getPlatformKeypair src/config/stellar.ts:23:48
❯ createQuizProof src/stellar/signatures.ts:21:19
❯ src/modules/quizzes/quiz.service.ts:269:13
❯ NodePgSession.transaction node_modules/src/node-postgres/session.ts:193:19
❯ withLock src/utils/lock.ts:50:12
❯ src/test/quiz-grading-and-warming.test.ts:91:20
|
|
Lint & Typecheck
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/cache@v4, actions/checkout@v4, actions/setup-node@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Lint & Typecheck:
src/modules/quizzes/quiz.service.ts#L18
'QuizQuestion' is defined but never used. Allowed unused vars must match /^_/u
|
|
Lint & Typecheck:
src/middleware/validation.ts#L41
Unexpected any. Specify a different type
|
|
Lint & Typecheck:
src/middleware/validation.ts#L32
Unexpected any. Specify a different type
|
|
Lint & Typecheck:
src/middleware/response-envelope.ts#L13
Unexpected any. Specify a different type
|
|
Lint & Typecheck:
src/middleware/rate-limit.ts#L51
Unexpected any. Specify a different type
|
|
Lint & Typecheck:
src/middleware/rate-limit.ts#L20
Unexpected any. Specify a different type
|
|
Lint & Typecheck:
src/middleware/idempotency.ts#L3
'and' is defined but never used. Allowed unused vars must match /^_/u
|
|
Lint & Typecheck:
src/middleware/auth.ts#L18
'reply' is defined but never used. Allowed unused args must match /^_/u
|
|
Lint & Typecheck:
src/database/seed.ts#L53
'course3' is assigned a value but never used. Allowed unused vars must match /^_/u
|
|
Lint & Typecheck:
src/config/index.ts#L92
Unexpected any. Specify a different type
|
|
Test
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/cache@v4, actions/checkout@v4, actions/setup-node@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|