Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
test:
if: github.base_ref == 'main'
runs-on: ubuntu-latest
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

steps:
- name: Checkout repository
Expand Down
203 changes: 190 additions & 13 deletions bun.lock

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,32 @@
"jest-mock-extended": "^4.0.0",
"lint-staged": "^16.1.2",
"prettier": "^3.6.2",
"prisma": "^6.11.1",
"prisma": "^7.2.0",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"ts-node-dev": "^2.0.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.36.0"
},
"dependencies": {
"@prisma/client": "^6.11.1",
"@prisma/adapter-pg": "^7.2.0",
"@prisma/client": "^7.2.0",
"@supabase/supabase-js": "^2.50.5",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.3",
"@types/morgan": "^1.9.10",
"@types/multer": "^2.0.0",
"@types/node": "^24.0.13",
"@types/pg": "^8.16.0",
"@types/uuid": "^10.0.0",
"apidoc": "^1.2.0",
"body-parser": "^2.2.0",
"cors": "^2.8.5",
"dotenv": "^17.2.0",
"dotenv": "^17.2.3",
"express": "^5.1.0",
"husky": "^9.1.7",
"jest": "^30.0.4",
"morgan": "^1.10.1",
"multer": "^2.0.1",
"pg": "^8.16.3",
"ts-jest": "^29.4.0",
"ts-node": "^10.9.2",
"uuid": "^11.1.0",
Expand Down
17 changes: 17 additions & 0 deletions prisma.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import dotenv from "dotenv";
import path from "node:path";
import { defineConfig,env } from "prisma/config";

dotenv.config({
path: "./.env",
});

export default defineConfig({
schema: path.join("prisma", "schema.prisma"),
migrations: {
path: path.join("prisma", "migrations"),
},
datasource: {
url: env("DATABASE_URL"),
},
});
4 changes: 1 addition & 3 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
provider = "prisma-client-js"
provider = "prisma-client"
output = "../src/generated/prisma"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}

model Member {
Expand Down
2 changes: 1 addition & 1 deletion tests/Interview.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getInterviews, getInterviewById, createInterview, updateInterviewById, deleteInterviewById} from '../src/controllers/interview.controller';
import * as interviewService from '../src/services/interview.service';
import { ApiError } from '../src/utils/apiError';
import { Verdict } from '../src/generated/prisma';
import { Verdict } from '../src/generated/prisma/enums';

describe('getInterviews', () => {
it('should return 200 and all interviews', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/Progress.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from "../src/controllers/progress.controller";
import * as progressServices from "../src/services/progress.service";
import { Request, Response } from "express";
import { CompletedQuestion } from "../src/generated/prisma";
import { CompletedQuestion } from "../src/generated/prisma/enums";
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
import { ApiError } from "../src/utils/apiError";

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion tests/Question.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
updateQuestion,
deleteQuestion,
} from "../src/controllers/question.controller";
import { Question } from "../src/generated/prisma";
import { Question } from "../src/generated/prisma/client";
import { ApiError } from "../src/utils/apiError";

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion tests/Topics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "../src/controllers/topic.controller";
import * as topicServices from "../src/services/topic.service";
import { ApiError } from "../src/utils/apiError";
import { Topic } from "../src/generated/prisma";
import { Topic } from "../src/generated/prisma/browser";

beforeEach(() => {
jest.clearAllMocks();
Expand Down
Loading