Skip to content

CICD - Unit | Integration | E2E #9

CICD - Unit | Integration | E2E

CICD - Unit | Integration | E2E #9

Triggered via pull request April 20, 2026 15:47
@JoanMVPopovJoanMVPopov
synchronize #125
cicd
Status Failure
Total duration 4m 41s
Artifacts 2

ci.yml

on: pull_request
Unit & Integration Tests
4m 37s
Unit & Integration Tests
Fit to window
Zoom out
Zoom in

Annotations

20 errors and 1 warning
tests/integration/endpoints/course.test.ts > [POST] /api/course > should not add a courses with the same name: tests/utility/publicationsUtility.ts#L20
TypeError: Cannot convert undefined or null to object ❯ Module.randomEnumValue tests/utility/publicationsUtility.ts:20:49 ❯ Module.generateCourseData tests/utility/courses.ts:41:21 ❯ tests/integration/endpoints/course.test.ts:30:22
tests/integration/endpoints/course.test.ts > [POST] /api/course > should add a course to the database: tests/utility/publicationsUtility.ts#L20
TypeError: Cannot convert undefined or null to object ❯ Module.randomEnumValue tests/utility/publicationsUtility.ts:20:49 ❯ Module.generateCourseData tests/utility/courses.ts:41:21 ❯ tests/integration/endpoints/course.test.ts:22:25
tests/integration/endpoints/course.test.ts > [POST] /api/course > should add a course to the database: tests/utility/publicationsUtility.ts#L20
TypeError: Cannot convert undefined or null to object ❯ Module.randomEnumValue tests/utility/publicationsUtility.ts:20:49 ❯ Module.generateCourseData tests/utility/courses.ts:41:21 ❯ tests/integration/endpoints/course.test.ts:22:25
tests/integration/endpoints/course.test.ts > [POST] /api/course > should add a course to the database: tests/utility/publicationsUtility.ts#L20
TypeError: Cannot convert undefined or null to object ❯ Module.randomEnumValue tests/utility/publicationsUtility.ts:20:49 ❯ Module.generateCourseData tests/utility/courses.ts:41:21 ❯ tests/integration/endpoints/course.test.ts:22:25
tests/integration/endpoints/circuit.test.ts > Circuits > [DELETE] /circuit/:id > should respond with 200 if successful deletion of everything related to circuit: tests/utility/publicationsUtility.ts#L113
PrismaClientValidationError: Invalid `prisma.material.create()` invocation: { data: { copyright: "E8SSE3JpTH", timeEstimate: 5, theoryPractice: 0.3475678507958393, encapsulatingType: "slides", publication: { create: { title: "PguRJvbhvTN8cJ1C1u5R", description: "R3LUI3dIAtvKhJZ53rz8F1MFpDcIZGn0zx0WfUBYP16tGqyDCKBQFKPPqwc4CikgfAInIfjzBKYhHTjYcXDBA3haRPr70w1I4gTW", difficulty: "hard", learningObjectives: [ "7R6qrTtbeLlhscHnKp2X" ], prerequisites: [ "Im1HWw5N0jMXEYbKfr0k" ], type: "Material", publisher: { connect: { id: "eed33e9b-8c46-460b-ab40-f1354a3b2ef7" } }, course: { connect: { id: undefined, ? courseName?: String, ? AND?: CourseWhereInput | CourseWhereInput[], ? OR?: CourseWhereInput[], ? NOT?: CourseWhereInput | CourseWhereInput[], ? learningObjectives?: StringNullableListFilter, ? prerequisites?: StringNullableListFilter, ? educationalLevel?: StringFilter | String, ? copyright?: StringFilter | String, ? publications?: PublicationListRelationFilter, ? maintainers?: UserListRelationFilter, ? coverPic?: FileNullableRelationFilter | FileWhereInput | Null } }, isDraft: false } } }, include: { publication: true } } Argument `connect` of type CourseWhereUniqueInput needs at least one of `id` or `courseName` arguments. Available options are marked with ?. ❯ wn node_modules/@prisma/client/runtime/library.js:29:1363 ❯ $n.handleRequestError node_modules/@prisma/client/runtime/library.js:121:6958 ❯ $n.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:121:6623 ❯ $n.request node_modules/@prisma/client/runtime/library.js:121:6307 ❯ l node_modules/@prisma/client/runtime/library.js:130:9633 ❯ Module.createUniqueMaterial tests/utility/publicationsUtility.ts:113:22 ❯ tests/integration/endpoints/circuit.test.ts:166:21 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { clientVersion: '5.22.0' }
tests/integration/endpoints/circuit.test.ts > Circuits > [DELETE] /circuit/:id > should respond with 200 if successful deletion of everything related to circuit: tests/utility/publicationsUtility.ts#L113
PrismaClientValidationError: Invalid `prisma.material.create()` invocation: { data: { copyright: "Rhm44RiXvE", timeEstimate: 9, theoryPractice: 0.0160463547537415, encapsulatingType: "lectureNotes", publication: { create: { title: "0VOpPf0Y3JrqYUdUtxGu", description: "ritXI9hTq2f0TySOlt9fyNrzbfIlM6EpsKi9sBkOVdlMxZJwYBstCpMYg4XXtFtMRRPEP0drD6eXi6v26GFqgMBCkCVROuoMNAwQ", difficulty: "hard", learningObjectives: [ "fY9LicE94XJroVvTEbRa" ], prerequisites: [ "omVBsKa2fss9UoNPY4UZ" ], type: "Material", publisher: { connect: { id: "855978c6-bddf-4955-aa14-de84c8c2ebdc" } }, course: { connect: { id: undefined, ? courseName?: String, ? AND?: CourseWhereInput | CourseWhereInput[], ? OR?: CourseWhereInput[], ? NOT?: CourseWhereInput | CourseWhereInput[], ? learningObjectives?: StringNullableListFilter, ? prerequisites?: StringNullableListFilter, ? educationalLevel?: StringFilter | String, ? copyright?: StringFilter | String, ? publications?: PublicationListRelationFilter, ? maintainers?: UserListRelationFilter, ? coverPic?: FileNullableRelationFilter | FileWhereInput | Null } }, isDraft: false } } }, include: { publication: true } } Argument `connect` of type CourseWhereUniqueInput needs at least one of `id` or `courseName` arguments. Available options are marked with ?. ❯ wn node_modules/@prisma/client/runtime/library.js:29:1363 ❯ $n.handleRequestError node_modules/@prisma/client/runtime/library.js:121:6958 ❯ $n.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:121:6623 ❯ $n.request node_modules/@prisma/client/runtime/library.js:121:6307 ❯ l node_modules/@prisma/client/runtime/library.js:130:9633 ❯ Module.createUniqueMaterial tests/utility/publicationsUtility.ts:113:22 ❯ tests/integration/endpoints/circuit.test.ts:166:21 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { clientVersion: '5.22.0' }
tests/integration/endpoints/circuit.test.ts > Circuits > [DELETE] /circuit/:id > should respond with 200 if successful deletion of everything related to circuit: tests/utility/publicationsUtility.ts#L113
PrismaClientValidationError: Invalid `prisma.material.create()` invocation: { data: { copyright: "ZrreVkZdGR", timeEstimate: 7, theoryPractice: 0.8159594386803755, encapsulatingType: "assignment", publication: { create: { title: "7KdzE4ckD6S5kfpaHYce", description: "V0uVPOUQnss4LTefPGU0cxlrWRITkuginTd0ATEV0dTwX08adL2j25l80HifqgrqZxTm3AcpBvxDb8KGiqmN8ZYVYc7RptpwWW6u", difficulty: "medium", learningObjectives: [ "cvBfruPiqnR9NVCCe9ox" ], prerequisites: [ "r6EDhohQcsp8ME7wSiDd" ], type: "Material", publisher: { connect: { id: "780b5429-e740-49fa-a44a-bdc621c757f5" } }, course: { connect: { id: undefined, ? courseName?: String, ? AND?: CourseWhereInput | CourseWhereInput[], ? OR?: CourseWhereInput[], ? NOT?: CourseWhereInput | CourseWhereInput[], ? learningObjectives?: StringNullableListFilter, ? prerequisites?: StringNullableListFilter, ? educationalLevel?: StringFilter | String, ? copyright?: StringFilter | String, ? publications?: PublicationListRelationFilter, ? maintainers?: UserListRelationFilter, ? coverPic?: FileNullableRelationFilter | FileWhereInput | Null } }, isDraft: false } } }, include: { publication: true } } Argument `connect` of type CourseWhereUniqueInput needs at least one of `id` or `courseName` arguments. Available options are marked with ?. ❯ wn node_modules/@prisma/client/runtime/library.js:29:1363 ❯ $n.handleRequestError node_modules/@prisma/client/runtime/library.js:121:6958 ❯ $n.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:121:6623 ❯ $n.request node_modules/@prisma/client/runtime/library.js:121:6307 ❯ l node_modules/@prisma/client/runtime/library.js:130:9633 ❯ Module.createUniqueMaterial tests/utility/publicationsUtility.ts:113:22 ❯ tests/integration/endpoints/circuit.test.ts:166:21 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { clientVersion: '5.22.0' }
tests/integration/endpoints/circuit.test.ts > Circuits > [GET] /circuit/:id > should respond with 500 if a server-side error occurs during execution (no profile picture in circuit): tests/integration/endpoints/circuit.test.ts#L80
AssertionError: expected 200 to be 500 // Object.is equality - Expected + Received - 500 + 200 ❯ tests/integration/endpoints/circuit.test.ts:80:28
tests/integration/endpoints/circuit.test.ts > Circuits > [GET] /circuit/:id > should respond with 500 if a server-side error occurs during execution (no profile picture in circuit): tests/integration/endpoints/circuit.test.ts#L80
AssertionError: expected 200 to be 500 // Object.is equality - Expected + Received - 500 + 200 ❯ tests/integration/endpoints/circuit.test.ts:80:28
tests/integration/endpoints/circuit.test.ts > Circuits > [GET] /circuit/:id > should respond with 500 if a server-side error occurs during execution (no profile picture in circuit): tests/integration/endpoints/circuit.test.ts#L80
AssertionError: expected 200 to be 500 // Object.is equality - Expected + Received - 500 + 200 ❯ tests/integration/endpoints/circuit.test.ts:80:28
tests/unit/file.test.ts > addCoverPic > should add cover pic and associate with publication: tests/unit/file.test.ts#L135
AssertionError: expected "spy" to be called with arguments: [ { data: { …(4) } } ] Received: 1st spy call: [ { "data": { "path": "coverPicPath", - "publicationId": 1, + "publicationId": undefined, "title": "cover.jpg", "type": "image/jpeg", }, }, ] Number of calls: 1 ❯ tests/unit/file.test.ts:135:30
tests/unit/file.test.ts > coverPicFetcher > should return cover pic data if coverPic is provided: tests/unit/file.test.ts#L105
AssertionError: expected Promise{…} to deeply equal { fileId: 'coverPicPath', …(1) } - Expected + Received - { - "data": "Y292ZXJQaWNEYXRh", - "fileId": "coverPicPath", - } + Promise {} ❯ tests/unit/file.test.ts:105:18
tests/unit/file.test.ts > coverPicFetcher > should return default cover pic if coverPic is null: tests/unit/file.test.ts#L85
AssertionError: expected Promise{…} to deeply equal { fileId: undefined, …(1) } - Expected + Received - { - "data": "ZGVmYXVsdENvdmVyUGljRGF0YQ==", - "fileId": undefined, - } + Promise {} ❯ tests/unit/file.test.ts:85:18
tests/unit/file.test.ts > profilePicFetcher > should return profile pic data if profilePic is provided: tests/unit/file.test.ts#L62
AssertionError: expected Promise{…} to deeply equal { fileId: 'profilePicPath', …(1) } - Expected + Received - { - "data": "cHJvZmlsZVBpY0RhdGE=", - "fileId": "profilePicPath", - } + Promise {} ❯ tests/unit/file.test.ts:62:18
tests/unit/file.test.ts > profilePicFetcher > should return default profile pic if profilePic is null: tests/unit/file.test.ts#L42
AssertionError: expected Promise{…} to deeply equal { fileId: undefined, …(1) } - Expected + Received - { - "data": "ZGVmYXVsdFByb2ZpbGVQaWNEYXRh", - "fileId": undefined, - } + Promise {} ❯ tests/unit/file.test.ts:42:18
tests/unit/db.test.ts > getAllPublications > should return all publications if no filters are applied: tests/unit/db.test.ts#L271
AssertionError: expected "spy" to be called with arguments: [ { where: { AND: [] }, …(1) } ] Received: 1st spy call: @@ -3,20 +3,26 @@ "include": { "circuit": true, "coverPic": true, "materials": true, "publisher": { - "include": { + "select": { + "firstName": true, + "lastName": true, "profilePic": true, + "username": true, }, }, "tags": true, "usedInCourse": { "select": { "course": true, }, }, + }, + "orderBy": { + "createdAt": "desc", }, "where": { "AND": [], }, }, Number of calls: 1 ❯ tests/unit/db.test.ts:271:39
tests/unit/db.test.ts > getAllPublications > should return publications filtered by search query: tests/unit/db.test.ts#L237
AssertionError: expected "spy" to be called with arguments: [ { where: { AND: [] }, …(1) } ] Received: 1st spy call: @@ -3,20 +3,26 @@ "include": { "circuit": true, "coverPic": true, "materials": true, "publisher": { - "include": { + "select": { + "firstName": true, + "lastName": true, "profilePic": true, + "username": true, }, }, "tags": true, "usedInCourse": { "select": { "course": true, }, }, + }, + "orderBy": { + "createdAt": "desc", }, "where": { "AND": [], }, }, Number of calls: 1 ❯ tests/unit/db.test.ts:237:39
tests/unit/db.test.ts > getAllPublications > should return publications filtered by publisher IDs: tests/unit/db.test.ts#L184
AssertionError: expected "spy" to be called with arguments: [ { …(2) } ] Received: 1st spy call: @@ -3,20 +3,26 @@ "include": { "circuit": true, "coverPic": true, "materials": true, "publisher": { - "include": { + "select": { + "firstName": true, + "lastName": true, "profilePic": true, + "username": true, }, }, "tags": true, "usedInCourse": { "select": { "course": true, }, }, + }, + "orderBy": { + "createdAt": "desc", }, "where": { "AND": [ { "publisherId": { Number of calls: 1 ❯ tests/unit/db.test.ts:184:39
tests/unit/db.test.ts > getPublicationById > should return null if publication is not found: tests/unit/db.test.ts#L99
AssertionError: expected "spy" to be called with arguments: [ { where: { id: 999 }, …(1) } ] Received: 1st spy call: @@ -45,19 +45,35 @@ "profilePic": true, }, }, }, }, + "course": { + "select": { + "courseName": true, + "educationalLevel": true, + "id": true, + "learningObjectives": true, + "prerequisites": true, + }, + }, "coverPic": true, "maintainers": { "include": { "profilePic": true, }, }, "materials": { "include": { - "files": true, + "fileURLs": true, + "files": { + "select": { + "path": true, + "title": true, + "type": true, + }, + }, "publication": true, }, }, "publisher": { "include": { Number of calls: 1 ❯ tests/unit/db.test.ts:99:41
tests/unit/db.test.ts > getPublicationById > should return a publication with the given id: tests/unit/db.test.ts#L21
AssertionError: expected "spy" to be called with arguments: [ { where: { id: 1 }, …(1) } ] Received: 1st spy call: @@ -45,19 +45,35 @@ "profilePic": true, }, }, }, }, + "course": { + "select": { + "courseName": true, + "educationalLevel": true, + "id": true, + "learningObjectives": true, + "prerequisites": true, + }, + }, "coverPic": true, "maintainers": { "include": { "profilePic": true, }, }, "materials": { "include": { - "files": true, + "fileURLs": true, + "files": { + "select": { + "path": true, + "title": true, + "type": true, + }, + }, "publication": true, }, }, "publisher": { "include": { Number of calls: 1 ❯ tests/unit/db.test.ts:21:41
Unit & Integration Tests
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, actions/setup-node@v4, actions/upload-artifact@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Artifacts

Produced during runtime
Name Size Digest
coverage-integration Expired
236 KB
sha256:828810a4437a239eb9eb2b4e68e2a6f88be7a0e1f8af000bcf88f48686096cdb
coverage-unit Expired
186 KB
sha256:0feef417d74cb199fdca580f14f42b2947b35871107712971648f067d6247973